refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an :around advice.
This commit is contained in:
parent
12732be155
commit
06392a723f
51 changed files with 223 additions and 229 deletions
|
@ -99,7 +99,7 @@ Stolen shamelessly from go-mode"
|
|||
(if fmt (intern fmt))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +format-probe-a (orig-fn)
|
||||
(defun +format-probe-a (fn)
|
||||
"Use `+format-with' instead, if it is set.
|
||||
Prompts for a formatter if universal arg is set."
|
||||
(cond ((or buffer-read-only (eq +format-with :none))
|
||||
|
@ -118,7 +118,7 @@ Prompts for a formatter if universal arg is set."
|
|||
(bound-and-true-p eglot--managed-mode)
|
||||
(eglot--server-capable :documentFormattingProvider))
|
||||
(list 'eglot nil))
|
||||
((funcall orig-fn))))
|
||||
((funcall fn))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +format-buffer-a (formatter mode-result)
|
||||
|
|
|
@ -71,7 +71,7 @@ This is controlled by `+format-on-save-enabled-modes'."
|
|||
|
||||
;; Don't pop up imposing warnings about missing formatters, but still log it in
|
||||
;; to *Messages*.
|
||||
(defadvice! +format--all-buffer-from-hook-a (orig-fn &rest args)
|
||||
(defadvice! +format--all-buffer-from-hook-a (fn &rest args)
|
||||
:around #'format-all-buffer--from-hook
|
||||
(letf! (defun format-all-buffer--with (formatter mode-result)
|
||||
(when (or (eq formatter 'lsp)
|
||||
|
@ -83,4 +83,4 @@ This is controlled by `+format-on-save-enabled-modes'."
|
|||
(gethash formatter format-all--executable-table))
|
||||
nil)))
|
||||
(funcall format-all-buffer--with formatter mode-result)))
|
||||
(apply orig-fn args)))
|
||||
(apply fn args)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue