1663 |
(defun TeX-run-style-hooks (&rest styles) |
(defun TeX-run-style-hooks (&rest styles) |
1664 |
"Run the TeX style hooks STYLES." |
"Run the TeX style hooks STYLES." |
1665 |
(mapcar (lambda (style) |
(mapcar (lambda (style) |
1666 |
(if (TeX-member style TeX-active-styles 'string-equal) |
;; Avoid recursion. |
1667 |
() ;Avoid recursion. |
(unless (TeX-member style TeX-active-styles 'string-equal) |
1668 |
(setq TeX-active-styles |
(setq TeX-active-styles |
1669 |
(cons style TeX-active-styles)) |
(cons style TeX-active-styles)) |
1670 |
(TeX-load-style style) |
(TeX-load-style style) |
1671 |
(if (string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style) |
(let ((default-directory default-directory)) |
1672 |
(setq style ; Complex path |
;; Complex path. |
1673 |
(substring style (match-beginning 2) (match-end 2)))) |
(when (string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style) |
1674 |
(mapcar 'funcall |
;; Adjust `default-directory' to the directory of the style. |
1675 |
(cdr-safe (assoc style TeX-style-hook-list))))) |
(setq default-directory (expand-file-name |
1676 |
|
(file-name-directory style)) |
1677 |
|
style (substring style |
1678 |
|
(match-beginning 2) (match-end 2)))) |
1679 |
|
(mapcar 'funcall |
1680 |
|
(cdr-safe (assoc style TeX-style-hook-list)))))) |
1681 |
styles)) |
styles)) |
1682 |
|
|
1683 |
(defcustom TeX-parse-self nil |
(defcustom TeX-parse-self nil |