[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 5d2829aed4 49/60: Remove old defadvices (patch b
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 5d2829aed4 49/60: Remove old defadvices (patch by Stefan Monnier) |
Date: |
Fri, 8 Apr 2022 11:52:55 -0400 (EDT) |
branch: externals/auctex
commit 5d2829aed4b269ab84a5da1c9f8481fe4dd770b4
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
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.
---
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(-)
diff --git a/auctex.el.in b/auctex.el.in
index 377c733913..014c0a2b8a 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 afdc42791e..2f5c57e8e8 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 a3d0a064cf..a8696f39c2 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 558f78873e..dc779fcc1a 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 e0947b73d3..ca4b8ad35b 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'
- [elpa] externals/auctex 8e7d19fe84 44/60: Make tex-buf.el compile without (require 'latex), (continued)
- [elpa] externals/auctex 8e7d19fe84 44/60: Make tex-buf.el compile without (require 'latex), Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 4b1c7015ae 45/60: Move contents of tex-buf.el into tex.el, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 7e6d83ff4e 47/60: Add news, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 45aff50ff3 48/60: Support \mathcolor in style/x?color.el, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 180cc28dfa 50/60: Apply remaining portion of Stefan's patch, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex e1c3e37e0c 56/60: ; Update copyright year, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex e83ca6a072 57/60: Update style/doc.el to package version 3.0h, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 5cf46ff8e2 52/60: Improve parsing of re-definitions, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex fd118c67d4 58/60: ; * style/doc.el (LaTeX-env-doc-no-comment): Fix docstring., Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 323eb08ca6 46/60: Assign reasonable sentinel in AmS-TeX mode, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 5d2829aed4 49/60: Remove old defadvices (patch by Stefan Monnier),
Tassilo Horn <=
- [elpa] externals/auctex 69b78fcc26 54/60: Don't change indentation when defining a conditional, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex 03ed9004cd 60/60: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2022/04/08
- [elpa] externals/auctex fded69c292 59/60: Let \Describe<foo> macros stay on their own lines, Tassilo Horn, 2022/04/08