auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] Changes to auctex/tex.el


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/tex.el
Date: Fri, 15 Jul 2005 04:40:24 -0400

Index: auctex/tex.el
diff -u auctex/tex.el:5.532 auctex/tex.el:5.533
--- auctex/tex.el:5.532 Fri Jul  8 16:43:29 2005
+++ auctex/tex.el       Fri Jul 15 08:40:23 2005
@@ -1663,16 +1663,21 @@
 (defun TeX-run-style-hooks (&rest styles)
   "Run the TeX style hooks STYLES."
   (mapcar (lambda (style)
-           (if (TeX-member style TeX-active-styles 'string-equal)
-               ()                      ;Avoid recursion.
+           ;; Avoid recursion.
+           (unless (TeX-member style TeX-active-styles 'string-equal)
              (setq TeX-active-styles
                    (cons style TeX-active-styles))
              (TeX-load-style style)
-             (if (string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style)
-                 (setq style           ; Complex path
-                       (substring style (match-beginning 2) (match-end 2))))
-             (mapcar 'funcall
-                     (cdr-safe (assoc style TeX-style-hook-list)))))
+             (let ((default-directory default-directory))
+               ;; Complex path.
+               (when (string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style)
+                 ;; Adjust `default-directory' to the directory of the style.
+                 (setq default-directory (expand-file-name
+                                          (file-name-directory style))
+                       style (substring style
+                                        (match-beginning 2) (match-end 2))))
+               (mapcar 'funcall
+                       (cdr-safe (assoc style TeX-style-hook-list))))))
          styles))
 
 (defcustom TeX-parse-self nil




reply via email to

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