emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 8af05de 01/11: Apply styles in reverse order


From: Tassilo Horn
Subject: [elpa] externals/auctex 8af05de 01/11: Apply styles in reverse order
Date: Sat, 11 Apr 2015 12:02:38 +0000

branch: externals/auctex
commit 8af05de02e766633d594ffb63a44415a0f6d2169
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Apply styles in reverse order
    
    * tex.el (TeX-run-style-hooks): Apply style hooks in reverse
    order.  With that, a local style can modify a private or a global
    style, and a private style can modify a global one.
---
 ChangeLog |    6 ++++++
 tex.el    |    6 +++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e0a1036..146564f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-23  Tassilo Horn  <address@hidden>
+
+       * tex.el (TeX-run-style-hooks): Apply style hooks in reverse
+       order.  With that, a local style can modify a private or a global
+       style, and a private style can modify a global one.
+
 2015-03-17  Mos� Giordano  <address@hidden>
 
        * doc/wininstall.texi: Fix a broken link.
diff --git a/tex.el b/tex.el
index 88e2336..df8369f 100644
--- a/tex.el
+++ b/tex.el
@@ -2708,7 +2708,11 @@ See variable `TeX-style-hook-dialect' for supported 
dialects."
                                (and (TeX-shdex-in-p TeX-style-hook-dialect 
(aref hook 2))
                                     (funcall (aref hook 1))))
                               (t (error "Invalid style hook %S" hook))))
-                           (cdr-safe (TeX-assoc-string style 
TeX-style-hook-list)))
+                           ;; Drop the LATEX entry and then reverse the list
+                           ;; of style hooks in order to run styles in the
+                           ;; order global, private, local (assuming
+                           ;; TeX-style-path has that ordering, too).
+                           (reverse (cdr-safe (TeX-assoc-string style 
TeX-style-hook-list))))
                  ;; This happens in case some style added a new parser, and
                  ;; now the style isn't used anymore (user deleted
                  ;; \usepackage{style}).  Then we're left over with, e.g.,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]