[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 180cc28dfa 50/60: Apply remaining
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 180cc28dfa 50/60: Apply remaining portion of Stefan's patch |
Date: |
Fri, 8 Apr 2022 11:52:55 -0400 (EDT) |
branch: externals/auctex
commit 180cc28dfa5c1f0ee378f374428fe4b1ce68b850
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Apply remaining portion of Stefan's patch
* preview.el.in (preview--open-for-replace):
(preview-query-replace-reveal):
* tex-site.el.in (TeX-modes-set):
(TeX-modes):
Discard fallbacks for emacsen lacking nadvice.
---
preview.el.in | 22 ++++++----------------
tex-site.el.in | 32 +++++++-------------------------
2 files changed, 13 insertions(+), 41 deletions(-)
diff --git a/preview.el.in b/preview.el.in
index e7243c5b9d..a980d814f6 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -1,6 +1,6 @@
;;; preview.el --- embed preview LaTeX images in source buffer -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2022 Free Software Foundation, Inc.
;; Author: David Kastrup
;; Keywords: tex, wp, convenience
@@ -2069,11 +2069,6 @@ overlays not in the active window."
(preview-toggle ovr)
(push ovr preview-temporary-opened))))
-(if (fboundp 'advice-add) ;Emacsā„24.4 (or ELPA package nadvice)
- nil ; See the defcustom below.
- (defadvice replace-highlight (before preview)
- (preview--open-for-replace (ad-get-arg 0) (ad-get-arg 1))))
-
(defun preview--open-for-replace (beg end &rest _)
"Make `query-replace' open preview text about to be replaced."
(preview-open-overlays (overlays-in beg end)))
@@ -2085,16 +2080,11 @@ overlays not in the active window."
:require 'preview
:set (lambda (symbol value)
(set-default symbol value)
- (if (fboundp 'advice-add) ; COMPATIBILITY for Emacs<24.4
- (if value
- (advice-add 'replace-highlight :before
- #'preview--open-for-replace)
- (advice-remove 'replace-highlight
- #'preview--open-for-replace))
- (if value
- (ad-enable-advice 'replace-highlight 'before 'preview)
- (ad-disable-advice 'replace-highlight 'before 'preview))
- (ad-activate 'replace-highlight)))
+ (if value
+ (advice-add 'replace-highlight :before
+ #'preview--open-for-replace)
+ (advice-remove 'replace-highlight
+ #'preview--open-for-replace)))
:initialize #'custom-initialize-reset)
(defun preview-relaxed-string= (&rest args)
diff --git a/tex-site.el.in b/tex-site.el.in
index dc779fcc1a..8757fefa83 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -1,6 +1,6 @@
;;; tex-site.el - Site specific variables. Don't edit. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2005-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2022 Free Software Foundation, Inc.
;;
;; completely rewritten.
@@ -98,30 +98,19 @@ shared by all users of a site."
(TeX-modes-set 'TeX-modes nil)
(setq load-path (delq TeX-lisp-directory load-path))))
-(defun TeX-modes-set (var value &optional update)
+(defun TeX-modes-set (var value &optional _ignored)
"Set VAR (which should be `TeX-modes') to VALUE.
This places either the standard or the AUCTeX versions of
-functions into the respective function cell of the mode.
-If UPDATE is set, a previously saved value for
-the non-AUCTeX function gets overwritten with the current
-definition."
+functions into the respective function cell of the mode."
(custom-set-default var value)
(let ((list TeX-mode-alist) elt)
(while list
(setq elt (car (pop list)))
(let ((dst (intern (concat "TeX-" (symbol-name elt)))))
- (if (fboundp 'advice-add)
- (if (memq elt value)
- (advice-add elt :override dst)
- (advice-remove elt dst))
- (when (or update (null (get elt 'tex-saved)))
- (when (fboundp elt)
- (put elt 'tex-saved (symbol-function elt))))
- (defalias elt
- (if (memq elt value)
- dst
- (get elt 'tex-saved))))))))
+ (if (memq elt value)
+ (advice-add elt :override dst)
+ (advice-remove elt dst))))))
(defcustom TeX-modes
(mapcar #'car TeX-mode-alist)
@@ -132,14 +121,7 @@ set it with `TeX-modes-set'."
:type (cons 'set
(mapcar (lambda(x) (list 'const (car x))) TeX-mode-alist))
:set #'TeX-modes-set
- :initialize(lambda (var value)
- (custom-initialize-reset var value)
- (unless (fboundp 'advice-add)
- (let ((list TeX-mode-alist))
- (while list
- (eval-after-load (cdar list)
- `(TeX-modes-set ',var ,var t))
- (setq list (cdr list)))))) )
+ :initialize #'custom-initialize-reset)
(defconst AUCTeX-version "@AUCTEXVERSION@"
"AUCTeX version.
- [AUCTeX-diffs] [elpa] externals/auctex 2af3c1bcbd 33/60: Add new style/ifthen.el, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 2af3c1bcbd 33/60: Add new style/ifthen.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e1c3e37e0c 56/60: ; Update copyright year, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 3df1e313ea 25/60: Adapt TeX-region-hook for lexical-binding, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex fded69c292 59/60: Let \Describe<foo> macros stay on their own lines, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 806100f29a 27/60: Delete obsoleted variables (bug#54339), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 9554d1e8a2 40/60: * doc/changes.texi: Announce the indentation improvement., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 8460859b69 34/60: Improve fontification of kernel macros, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 494d501e63 43/60: Adjust indenting of conditionals in styles, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 8e7d19fe84 44/60: Make tex-buf.el compile without (require 'latex), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 7e6d83ff4e 47/60: Add news, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 180cc28dfa 50/60: Apply remaining portion of Stefan's patch,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex fd118c67d4 58/60: ; * style/doc.el (LaTeX-env-doc-no-comment): Fix docstring., Tassilo Horn, 2022/04/08