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
|
@ -167,19 +167,19 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
|
|||
(add-to-list 'LaTeX-indent-environment-list `(,env +latex-indent-item-fn)))
|
||||
|
||||
;; Fix #1849: allow fill-paragraph in itemize/enumerate
|
||||
(defadvice! +latex--re-indent-itemize-and-enumerate-a (orig-fn &rest args)
|
||||
(defadvice! +latex--re-indent-itemize-and-enumerate-a (fn &rest args)
|
||||
:around #'LaTeX-fill-region-as-para-do
|
||||
(let ((LaTeX-indent-environment-list
|
||||
(append LaTeX-indent-environment-list
|
||||
'(("itemize" +latex-indent-item-fn)
|
||||
("enumerate" +latex-indent-item-fn)))))
|
||||
(apply orig-fn args)))
|
||||
(defadvice! +latex--dont-indent-itemize-and-enumerate-a (orig-fn &rest args)
|
||||
(apply fn args)))
|
||||
(defadvice! +latex--dont-indent-itemize-and-enumerate-a (fn &rest args)
|
||||
:around #'LaTeX-fill-region-as-paragraph
|
||||
(let ((LaTeX-indent-environment-list LaTeX-indent-environment-list))
|
||||
(delq! "itemize" LaTeX-indent-environment-list 'assoc)
|
||||
(delq! "enumerate" LaTeX-indent-environment-list 'assoc)
|
||||
(apply orig-fn args))))
|
||||
(apply fn args))))
|
||||
|
||||
|
||||
(use-package! preview
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue