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

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

[elpa] elpa 63a83c3 30/51: Make unloading of tex-site work on Emacs 24


From: Tassilo Horn
Subject: [elpa] elpa 63a83c3 30/51: Make unloading of tex-site work on Emacs 24
Date: Sun, 22 May 2016 07:22:49 +0000 (UTC)

branch: elpa
commit 63a83c376142ae47a45420830964dda65d3d6e37
Author: Ikumi Keita <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Make unloading of tex-site work on Emacs 24
    
    * tex-site.el.in (tex-site-unload-hook): Run `TeX-modes-set' when
      `advice-add' is defined.
    
    Signed-off-by: Mosè Giordano <address@hidden>
---
 tex-site.el.in |   32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/tex-site.el.in b/tex-site.el.in
index 8937315..1fcc4da 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -87,21 +87,23 @@ shared by all users of a site."
 
 (add-hook 'tex-site-unload-hook
          (lambda ()
-           (let ((list after-load-alist))
-             (while list
-               ;; Adapted copy of the definition of `assq-delete-all'
-               ;; from Emacs 21 as substitute for
-               ;; `(assq-delete-all'TeX-modes-set (car list))' which
-               ;; fails on non-list elements in Emacs 21.
-               (let* ((alist (car list))
-                      (tail alist)
-                      (key 'TeX-modes-set))
-                 (while tail
-                   (if (and (consp (car tail))
-                            (eq (car (car tail)) key))
-                       (setq alist (delq (car tail) alist)))
-                   (setq tail (cdr tail))))
-               (setq list (cdr list))))
+           (if (fboundp 'advice-add)
+               (TeX-modes-set 'TeX-modes nil)
+             (let ((list after-load-alist))
+               (while list
+                 ;; Adapted copy of the definition of `assq-delete-all'
+                 ;; from Emacs 21 as substitute for
+                 ;; `(assq-delete-all'TeX-modes-set (car list))' which
+                 ;; fails on non-list elements in Emacs 21.
+                 (let* ((alist (car list))
+                        (tail alist)
+                        (key 'TeX-modes-set))
+                   (while tail
+                     (if (and (consp (car tail))
+                              (eq (car (car tail)) key))
+                         (setq alist (delq (car tail) alist)))
+                     (setq tail (cdr tail))))
+                 (setq list (cdr list)))))
            (setq load-path (delq TeX-lisp-directory load-path))))
 
 (defun TeX-modes-set (var value &optional update)



reply via email to

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