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
|
@ -86,14 +86,14 @@ It is passed a user and repository name.")
|
|||
(set-popup-rule! "^\\*?[0-9]+:\\(?:new-\\|[0-9]+$\\)" :size 0.45 :modeline t :ttl 0 :quit nil)
|
||||
(set-popup-rule! "^\\*\\(?:[^/]+/[^ ]+ #[0-9]+\\*$\\|Issues\\|Pull-Requests\\|forge\\)" :ignore t)
|
||||
|
||||
(def-advice! +magit--forge-get-repository-lazily-a (&rest _)
|
||||
(defadvice! +magit--forge-get-repository-lazily-a (&rest _)
|
||||
"Make `forge-get-repository' return nil if the binary isn't built yet.
|
||||
This prevents emacsql getting compiled, which appears to come out of the blue
|
||||
and blocks Emacs for a short while."
|
||||
:before-while #'forge-get-repository
|
||||
(file-executable-p emacsql-sqlite-executable))
|
||||
|
||||
(def-advice! +magit--forge-build-binary-lazily-a (&rest _)
|
||||
(defadvice! +magit--forge-build-binary-lazily-a (&rest _)
|
||||
"Make `forge-dispatch' only build emacsql if necessary.
|
||||
Annoyingly, the binary gets built as soon as Forge is loaded. Since we've
|
||||
disabled that in `+magit--forge-get-repository-lazily-a', we must manually
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue