def-advice!->defadvice! & conform to new advice conventions
This commit does two things: - Renames def-advice! to defadvice!, in the spirit of naming convenience macros after the function/macro they enhance or replace. - Correct the names of advice functions to indicate visibility and intent. A public advice function like doom-set-jump-a is meant to be used elsewhere. A private one like +dired--cleanup-header-line-a shouldn't -- it likely won't work anywhere but the function(s) it was made to advise.
This commit is contained in:
parent
8aa7772e4e
commit
82ae3a73f3
43 changed files with 126 additions and 121 deletions
|
@ -56,7 +56,7 @@
|
|||
;; confusing than helpful.
|
||||
(advice-add #'dired-k--highlight-by-file-attribyte :override #'ignore)
|
||||
|
||||
(def-advice! +dired-interrupt-process-a (orig-fn &rest args)
|
||||
(defadvice! +dired--interrupt-process-a (orig-fn &rest args)
|
||||
"Fixes dired-k killing git processes too abruptly, leaving behind disruptive
|
||||
.git/index.lock files."
|
||||
:around #'dired-k--start-git-status
|
||||
|
@ -64,7 +64,7 @@
|
|||
(symbol-function #'interrupt-process)))
|
||||
(apply orig-fn args)))
|
||||
|
||||
(def-advice! +dired-dired-k-highlight-a (orig-fn &rest args)
|
||||
(defadvice! +dired--dired-k-highlight-a (orig-fn &rest args)
|
||||
"Butt out if the requested directory is remote (i.e. through tramp)."
|
||||
:around #'dired-k--highlight
|
||||
(unless (file-remote-p default-directory)
|
||||
|
@ -84,7 +84,7 @@
|
|||
|
||||
(set-popup-rule! "^\\*ranger" :ignore t)
|
||||
|
||||
(def-advice! +dired-cleanup-header-line-a ()
|
||||
(defadvice! +dired--cleanup-header-line-a ()
|
||||
"Ranger fails to clean up `header-line-format' when it is closed, so..."
|
||||
:before #'ranger-revert
|
||||
(dolist (buffer (buffer-list))
|
||||
|
@ -93,7 +93,7 @@
|
|||
(when (equal header-line-format '(:eval (ranger-header-line)))
|
||||
(setq header-line-format nil))))))
|
||||
|
||||
(def-advice! +dired-cleanup-mouse1-bind-a ()
|
||||
(defadvice! +dired--cleanup-mouse1-bind-a ()
|
||||
"Ranger binds an anonymous function to mouse-1 after previewing a buffer
|
||||
that prevents the user from escaping the window with the mouse. This command is
|
||||
never cleaned up if the buffer already existed before ranger was initialized, so
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
(after! git-timemachine
|
||||
;; HACK Waiting for https://gitlab.com/pidu/git-timemachine/issues/77
|
||||
(def-advice! +vc-git-timemachine-show-commit-a ()
|
||||
(defadvice! +vc--git-timemachine-show-commit-a ()
|
||||
"Fix `git-timemachine-show-commit'."
|
||||
:override #'git-timemachine-show-commit
|
||||
(interactive)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue