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

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

[elpa] 67/299: * tex.el (TeX-run-style-hooks): Guard running style hooks


From: Stefan Monnier
Subject: [elpa] 67/299: * tex.el (TeX-run-style-hooks): Guard running style hooks in a `condition-case' in order not to error in cases the auto file contains calls to functions that are defined by a style that has been deactivated in the meantime.
Date: Sun, 02 Nov 2014 03:10:21 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit 5e898c95b1401525c44363176aa8c8aab3de50b5
Author: Tassilo Horn <address@hidden>
Date:   Tue Feb 26 08:01:28 2013 +0000

    * tex.el (TeX-run-style-hooks): Guard running style hooks in a
    `condition-case' in order not to error in cases the auto file
    contains calls to functions that are defined by a style that has
    been deactivated in the meantime.
---
 ChangeLog |    7 +++++++
 tex.el    |   11 +++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 05b0122..50558c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-02-26  Tassilo Horn  <address@hidden>
+
+       * tex.el (TeX-run-style-hooks): Guard running style hooks in a
+       `condition-case' in order not to error in cases the auto file
+       contains calls to functions that are defined by a style that has
+       been deactivated in the meantime.
+
 2013-02-25  Werner Fink  <address@hidden>
 
        * style/dinbrief.el ("dinbrief"): Update dinbrief style.
diff --git a/tex.el b/tex.el
index e9036ba..4fe5e2e 100644
--- a/tex.el
+++ b/tex.el
@@ -2433,8 +2433,15 @@ active.")
                                            (TeX-master-directory))
                        style (substring style
                                         (match-beginning 2) (match-end 2))))
-               (mapcar 'funcall
-                       (cdr-safe (assoc style TeX-style-hook-list))))))
+               (condition-case err
+                   (mapcar 'funcall
+                           (cdr-safe (assoc 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.,
+                 ;; (LaTeX-add-siunitx-units "\\parsec"), but the function is
+                 ;; defined in a style siunitx.el that's not loaded anymore.
+                 (void-function nil)))))
          styles))
 
 (defcustom TeX-parse-self nil



reply via email to

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