General docstring+idempotency refactor
This commit is contained in:
parent
7c20a43be6
commit
2097498f3e
7 changed files with 35 additions and 25 deletions
|
@ -232,8 +232,9 @@ Example
|
|||
(doom--keymaps
|
||||
(dolist (keymap doom--keymaps)
|
||||
(push `(define-key ,keymap ,key ,def) forms)))
|
||||
(t (push `(,(if local 'local-set-key 'global-set-key) ,key ,def)
|
||||
forms))))
|
||||
(t
|
||||
(push `(,(if local 'local-set-key 'global-set-key) ,key ,def)
|
||||
forms))))
|
||||
(setq states '()
|
||||
local nil
|
||||
desc nil)))
|
||||
|
|
|
@ -334,11 +334,10 @@ ignore any `def-package!' blocks for PACKAGE."
|
|||
"Loads a file relative to the current module (or PATH). FILESYM is a file path
|
||||
as a symbol. PATH is a directory to prefix it with. If NOERROR is non-nil, don't
|
||||
throw an error if the file doesn't exist."
|
||||
(let ((path (or (and path
|
||||
(cond ((symbolp path) (symbol-value path))
|
||||
((stringp path) path)
|
||||
((listp path) (eval path))))
|
||||
(and load-file-name (file-name-directory load-file-name))
|
||||
(let ((path (or (and path (or (and (symbolp path) (symbol-value path))
|
||||
(and (stringp path) path)
|
||||
(and (listp path) (eval path))))
|
||||
(and load-file-name (file-name-directory load-file-name))
|
||||
(and (bound-and-true-p byte-compile-current-file)
|
||||
(file-name-directory byte-compile-current-file))
|
||||
(and buffer-file-name (file-name-directory buffer-file-name)))))
|
||||
|
|
|
@ -64,7 +64,8 @@ there are problems.")
|
|||
"Location of the autoloads file generated by `doom/reload-autoloads'.")
|
||||
|
||||
(defgroup doom nil
|
||||
""
|
||||
"DOOM Emacs, an Emacs configuration for a stubborn, shell-dwelling and
|
||||
melodramatic ex-vimmer disappointed with the text-editor status quo."
|
||||
:group 'emacs)
|
||||
|
||||
|
||||
|
@ -113,7 +114,7 @@ there are problems.")
|
|||
(setq custom-file (concat doom-etc-dir "custom.el"))
|
||||
(load custom-file t t)
|
||||
|
||||
;; be quiet at startup
|
||||
;; be quiet at startup; don't load anything unnecessary
|
||||
(advice-add #'display-startup-echo-area-message :override #'ignore)
|
||||
(setq inhibit-startup-message t
|
||||
inhibit-startup-echo-area-message user-login-name
|
||||
|
@ -180,6 +181,9 @@ enable multiple minor modes for the same regexp.")
|
|||
(load! core-keybinds)) ; centralized keybind system + which-key
|
||||
|
||||
(defun doom|init ()
|
||||
;; Don't keep gc-cons-threshold too high. It helps to stave off the GC while
|
||||
;; Emacs starts up, but afterwards it causes stuttering and random freezes. So
|
||||
;; reset it to a reasonable default.
|
||||
(setq gc-cons-threshold 16777216
|
||||
gc-cons-percentage 0.1
|
||||
file-name-handler-alist doom--file-name-handler-alist))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue