branch: externals/auctex
commit a9eb15592ff350e56ea1b172805e1d5449a572b3
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>
Fix regression
* latex.el (LaTeX-arg-usepackage-insert, LaTeX-arg-usepackage): Move
`TeX-run-style-hooks' from `LaTeX-arg-usepackage' to
`LaTeX-arg-usepackage-insert'. Due to my commit "Defer running style
hook until options are given actually", style hooks associated with
\usepackage were not run when the document is newly created with
`LaTeX-env-document'.
---
latex.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/latex.el b/latex.el
index 064199d..dd6c398 100644
--- a/latex.el
+++ b/latex.el
@@ -2352,7 +2352,8 @@ of the options, nil otherwise."
packages))
(insert LaTeX-optop options LaTeX-optcl))
(insert TeX-grop (mapconcat 'identity packages ",") TeX-grcl)
- (run-hooks 'LaTeX-after-usepackage-hook))
+ (run-hooks 'LaTeX-after-usepackage-hook)
+ (apply #'TeX-run-style-hooks packages))
(defun LaTeX-arg-usepackage (_optional)
"Insert arguments to usepackage.
@@ -2360,8 +2361,7 @@ OPTIONAL is ignored."
(let* ((packages-options (LaTeX-arg-usepackage-read-packages-with-options))
(packages (car packages-options))
(options (cdr packages-options)))
- (LaTeX-arg-usepackage-insert packages options)
- (apply #'TeX-run-style-hooks packages)))
+ (LaTeX-arg-usepackage-insert packages options)))
(defun LaTeX-insert-usepackages ()
"Prompt for the insertion of usepackage macros until empty