Minor refactor & comment/docstring revision
This commit is contained in:
parent
5b1dc3c63f
commit
c360f0dceb
5 changed files with 10 additions and 11 deletions
|
@ -62,7 +62,7 @@ POS defaults to the current position."
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Commands
|
;;; Commands
|
||||||
|
|
||||||
(defvar doom--last-backward-pt most-positive-fixnum)
|
(defvar doom--last-backward-pt most-positive-fixnum)
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
@ -247,7 +247,7 @@ editorconfig or dtrt-indent installed."
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Hooks
|
;;; Hooks
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-enable-delete-trailing-whitespace-h ()
|
(defun doom-enable-delete-trailing-whitespace-h ()
|
||||||
|
|
|
@ -49,10 +49,10 @@ and Emacs states, and for non-evil users.")
|
||||||
;; `keyboard-quit', but this is much more intuitive.
|
;; `keyboard-quit', but this is much more intuitive.
|
||||||
|
|
||||||
(defvar doom-escape-hook nil
|
(defvar doom-escape-hook nil
|
||||||
"A hook run after C-g is pressed (or ESC in normal mode, for evil users). Both
|
"A hook run when C-g is pressed (or ESC in normal mode, for evil users).
|
||||||
trigger `doom/escape'.
|
|
||||||
|
|
||||||
If any hook returns non-nil, all hooks after it are ignored.")
|
More specifically, when `doom/escape' is pressed. If any hook returns non-nil,
|
||||||
|
all hooks after it are ignored.")
|
||||||
|
|
||||||
(defun doom/escape ()
|
(defun doom/escape ()
|
||||||
"Run `doom-escape-hook'."
|
"Run `doom-escape-hook'."
|
||||||
|
@ -414,7 +414,6 @@ Properties
|
||||||
USE THIS IN YOUR PRIVATE CONFIG.
|
USE THIS IN YOUR PRIVATE CONFIG.
|
||||||
:after [FEATURE] [...] apply keybinds when [FEATURE] loads
|
:after [FEATURE] [...] apply keybinds when [FEATURE] loads
|
||||||
:textobj KEY INNER-FN OUTER-FN define a text object keybind pair
|
:textobj KEY INNER-FN OUTER-FN define a text object keybind pair
|
||||||
:if [CONDITION] [...]
|
|
||||||
:when [CONDITION] [...]
|
:when [CONDITION] [...]
|
||||||
:unless [CONDITION] [...]
|
:unless [CONDITION] [...]
|
||||||
|
|
||||||
|
|
|
@ -482,7 +482,7 @@ treat Emacs as a non-application window."
|
||||||
(add-hook! '(completion-list-mode-hook Man-mode-hook)
|
(add-hook! '(completion-list-mode-hook Man-mode-hook)
|
||||||
#'hide-mode-line-mode)
|
#'hide-mode-line-mode)
|
||||||
|
|
||||||
;; Better fontification of number literals in code
|
;; Many major modes do no highlighting of number literals, so we do it for them
|
||||||
(use-package! highlight-numbers
|
(use-package! highlight-numbers
|
||||||
:hook ((prog-mode conf-mode) . highlight-numbers-mode)
|
:hook ((prog-mode conf-mode) . highlight-numbers-mode)
|
||||||
:config (setq highlight-numbers-generic-regexp "\\_<[[:digit:]]+\\(?:\\.[0-9]*\\)?\\_>"))
|
:config (setq highlight-numbers-generic-regexp "\\_<[[:digit:]]+\\(?:\\.[0-9]*\\)?\\_>"))
|
||||||
|
@ -661,7 +661,7 @@ startup (or theme switch) time, so long as `doom--prefer-theme-elc' is non-nil."
|
||||||
"Initialize Doom's user interface by applying all its advice and hooks."
|
"Initialize Doom's user interface by applying all its advice and hooks."
|
||||||
(run-hook-wrapped 'doom-init-ui-hook #'doom-try-run-hook)
|
(run-hook-wrapped 'doom-init-ui-hook #'doom-try-run-hook)
|
||||||
|
|
||||||
(add-to-list 'kill-buffer-query-functions #'doom-protect-fallback-buffer-h nil 'eq)
|
(add-hook 'kill-buffer-query-functions #'doom-protect-fallback-buffer-h)
|
||||||
(add-hook 'after-change-major-mode-hook #'doom-highlight-non-default-indentation-h 'append)
|
(add-hook 'after-change-major-mode-hook #'doom-highlight-non-default-indentation-h 'append)
|
||||||
|
|
||||||
;; Initialize custom switch-{buffer,window,frame} hooks:
|
;; Initialize custom switch-{buffer,window,frame} hooks:
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
;; that behavior.
|
;; that behavior.
|
||||||
((symbol-function #'rustic-install-rls-client-p)
|
((symbol-function #'rustic-install-rls-client-p)
|
||||||
(lambda (&rest _)
|
(lambda (&rest _)
|
||||||
(message "No RLS server running."))))
|
(message "No RLS server running"))))
|
||||||
(apply orig-fn args))))
|
(apply orig-fn args))))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
;; Handles whitespace (tabs/spaces) settings externally. This way projects can
|
;; Handles whitespace (tabs/spaces) settings externally. This way projects can
|
||||||
;; specify their own formatting rules.
|
;; specify their own formatting rules.
|
||||||
(use-package! editorconfig
|
(use-package! editorconfig
|
||||||
:after-call (doom-switch-buffer-hook after-find-file)
|
:after-call doom-switch-buffer-hook after-find-file
|
||||||
:config
|
:config
|
||||||
(defadvice! +editorconfig--smart-detection-a (orig-fn)
|
(defadvice! +editorconfig--smart-detection-a (orig-fn)
|
||||||
"Retrieve the properties for the current file. If it doesn't have an
|
"Retrieve the properties for the current file. If it doesn't have an
|
||||||
|
@ -30,7 +30,7 @@ extension, try to guess one."
|
||||||
(if (and (not (bound-and-true-p org-src-mode))
|
(if (and (not (bound-and-true-p org-src-mode))
|
||||||
(file-name-extension buffer-file-name))
|
(file-name-extension buffer-file-name))
|
||||||
buffer-file-name
|
buffer-file-name
|
||||||
(format "%s%s" buffer-file-name
|
(format "%s%s" (buffer-file-name (buffer-base-buffer))
|
||||||
(if-let* ((ext (cdr (assq major-mode +editorconfig-mode-alist))))
|
(if-let* ((ext (cdr (assq major-mode +editorconfig-mode-alist))))
|
||||||
(concat "." ext)
|
(concat "." ext)
|
||||||
"")))))
|
"")))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue