auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 5d2829aed4b269ab84a5d


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 5d2829aed4b269ab84a5da1c9f8481fe4dd770b4
Date: Wed, 30 Mar 2022 07:17:53 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  5d2829aed4b269ab84a5da1c9f8481fe4dd770b4 (commit)
      from  45aff50ff39ab485cb25f0460ccb3c4e6a5a465b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5d2829aed4b269ab84a5da1c9f8481fe4dd770b4
Author: Tassilo Horn <tsdh@gnu.org>
Date:   Wed Mar 30 13:12:23 2022 +0200

    Remove old defadvices (patch by Stefan Monnier)
    
    * auctex.el.in: Require nadvice-0.3.
    * context.el (ConTeXt-add-environments): Unconditionally advise it
    with advice-add.
    * latex.el (LaTeX-add-bibliographies,LaTeX-add-environments): ditto.
    * tex-site.el.in (tex-site-unload-hook): ditto.
    * tex.el (hack-one-local-variable): ditto.

diff --git a/auctex.el.in b/auctex.el.in
index 377c7339..014c0a2b 100644
--- a/auctex.el.in
+++ b/auctex.el.in
@@ -5,7 +5,7 @@
 ;; URL: https://www.gnu.org/software/auctex/
 ;; Maintainer: auctex-devel@gnu.org
 ;; Notifications-To: auctex-diffs@gnu.org
-;; Package-Requires: ((emacs "24.3"))
+;; Package-Requires: ((emacs "24.3") (nadvice "0.3"))
 ;; Keywords: TeX LaTeX Texinfo ConTeXt docTeX preview-latex
 
 ;; This file is part of AUCTeX.
diff --git a/context.el b/context.el
index afdc4279..2f5c57e8 100644
--- a/context.el
+++ b/context.el
@@ -639,10 +639,7 @@ for a label to be inserted after the sectioning command."
 
 (TeX-auto-add-type "environment" "ConTeXt")
 
-(if (fboundp 'advice-add)               ;Emacs≥24.4 (or ELPA package nadvice)
-    (advice-add 'ConTeXt-add-environments :after #'ConTeXt--invalidate-menu)
-  (defadvice ConTeXt-add-environments (after ConTeXt-invalidate-menu (&rest 
environments) activate)
-    (ConTeXt--invalidate-menu)))
+(advice-add 'ConTeXt-add-environments :after #'ConTeXt--invalidate-menu)
 (defun ConTeXt--invalidate-menu (&rest _)
   "Mark the menu as being in need of a refresh."
   (setq ConTeXt-menu-changed t))
diff --git a/latex.el b/latex.el
index a3d0a064..a8696f39 100644
--- a/latex.el
+++ b/latex.el
@@ -2038,11 +2038,7 @@ The value is actually the tail of the list of options 
given to PACKAGE."
 
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-auto-cleanup)
 
-(if (fboundp 'advice-add)               ;Emacs≥24.4 (or ELPA package nadvice)
-    (advice-add 'LaTeX-add-bibliographies :after #'TeX-run-style-hooks)
-  (defadvice LaTeX-add-bibliographies (after run-bib-style-hooks (&rest 
bibliographies) activate)
-    "Add BIBLIOGRAPHIES to the list of known bibliographies and style files."
-    (apply #'TeX-run-style-hooks bibliographies)))
+(advice-add 'LaTeX-add-bibliographies :after #'TeX-run-style-hooks)
 
 ;;; Biber support
 
@@ -6361,10 +6357,7 @@ corresponds to the variables 
`LaTeX-environment-menu-name' and
                (mapcar #'LaTeX-environment-modify-menu-entry
                        (LaTeX-environment-list))))))))
 
-(if (fboundp 'advice-add)               ;Emacs≥24.4 (or ELPA package nadvice)
-    (advice-add 'LaTeX-add-environments :after #'LaTeX--invalidate-menus)
-  (defadvice LaTeX-add-environments (after LaTeX-invalidate-environment-menu 
(&rest environments) activate)
-    (LaTeX--invalidate-menus)))
+(advice-add 'LaTeX-add-environments :after #'LaTeX--invalidate-menus)
 (defun LaTeX--invalidate-menus (&rest _)
   "Mark the environment menus as being in need of a refresh."
   (setq LaTeX-environment-menu nil)
diff --git a/tex-site.el.in b/tex-site.el.in
index 558f7887..dc779fcc 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -95,23 +95,7 @@ shared by all users of a site."
 
 (add-hook 'tex-site-unload-hook
           (lambda ()
-            (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)))))
+            (TeX-modes-set 'TeX-modes nil)
             (setq load-path (delq TeX-lisp-directory load-path))))
 
 (defun TeX-modes-set (var value &optional update)
diff --git a/tex.el b/tex.el
index e0947b73..ca4b8ad3 100644
--- a/tex.el
+++ b/tex.el
@@ -746,11 +746,7 @@ emacs 24.1 and is then later run by emacs 24.5."
                           (add-to-list 'Info-file-list-for-emacs
                                        (cons elt "AUCTeX"))))
 
-(if (fboundp 'advice-add)               ;Emacs≥24.4 (or ELPA package nadvice)
-    (advice-add 'hack-one-local-variable :after #'TeX--call-minor-mode)
-  (defadvice hack-one-local-variable (after TeX-hack-one-local-variable-after
-                                          activate)
-    (TeX--call-minor-mode (ad-get-arg 0) (ad-get-arg 1))))
+(advice-add 'hack-one-local-variable :after #'TeX--call-minor-mode)
 (defun TeX--call-minor-mode (var val &rest _)
   "Call minor mode function if minor mode variable is found."
     ;; Instead of checking for each mode explicitly `minor-mode-list'

-----------------------------------------------------------------------

Summary of changes:
 auctex.el.in   |  2 +-
 context.el     |  5 +----
 latex.el       | 11 ++---------
 tex-site.el.in | 18 +-----------------
 tex.el         |  6 +-----
 5 files changed, 6 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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