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
|
@ -45,7 +45,7 @@ headings as titles, and you have more freedom to place them wherever you like.")
|
|||
:n [C-left] #'org-tree-slide-move-previous-tree)
|
||||
(add-hook 'org-tree-slide-mode-hook #'evil-normalize-keymaps))
|
||||
|
||||
(defadvice! +org-present--hide-first-heading-maybe-a (orig-fn &rest args)
|
||||
(defadvice! +org-present--hide-first-heading-maybe-a (fn &rest args)
|
||||
"Omit the first heading if `+org-present-hide-first-heading' is non-nil."
|
||||
:around #'org-tree-slide--display-tree-with-narrow
|
||||
(letf! (defun org-narrow-to-subtree ()
|
||||
|
@ -64,4 +64,4 @@ headings as titles, and you have more freedom to place them wherever you like.")
|
|||
(when (and (org-at-heading-p) (not (eobp)))
|
||||
(backward-char 1))
|
||||
(point)))))))
|
||||
(apply orig-fn args))))
|
||||
(apply fn args))))
|
||||
|
|
|
@ -29,14 +29,14 @@ of org-mode to properly utilize ID links.")
|
|||
;; Don't display warning message dedicated for v1 users. Need to be set early.
|
||||
(setq org-roam-v2-ack t)
|
||||
|
||||
(defadvice! +org-roam-suppress-sqlite-build-a (orig-fn &rest args)
|
||||
(defadvice! +org-roam-suppress-sqlite-build-a (fn &rest args)
|
||||
"Suppress automatic building of sqlite3 binary when loading `org-roam'.
|
||||
This is a blocking operation that can take a while to complete
|
||||
and better be deferred when there will be an actual demand for
|
||||
the database. See `+org-init-roam-h' for the launch process."
|
||||
:around #'emacsql-sqlite-ensure-binary
|
||||
(if (not (boundp 'org-roam-db-version))
|
||||
(apply orig-fn args)
|
||||
(apply fn args)
|
||||
(advice-remove #'emacsql-sqlite-ensure-binary #'+org-roam-suppress-sqlite-build-a)
|
||||
nil))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue