auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 8c3e73c4bb 07/37: Unbreak in-buffer completion f


From: Tassilo Horn
Subject: [elpa] externals/auctex 8c3e73c4bb 07/37: Unbreak in-buffer completion for Emacs prior to v.28
Date: Wed, 11 Oct 2023 03:41:54 -0400 (EDT)

branch: externals/auctex
commit 8c3e73c4bb978561ed846c1c28216c796fe25f6c
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Unbreak in-buffer completion for Emacs prior to v.28
    
    * tex.el (TeX-always): New compatibilty function for Emacs prior
    to version 28.
    * latex.el (LaTeX-completion-parse-args): Use the new function.
---
 latex.el |  2 +-
 tex.el   | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/latex.el b/latex.el
index 8cb9699d42..85c5c6af03 100644
--- a/latex.el
+++ b/latex.el
@@ -7724,7 +7724,7 @@ or `LaTeX-environment-list' and returns it."
     ;; cases, but will also fail for example in hyperref.el.  This
     ;; decision should revisited at a later stage:
     (when (assq 'TeX-arg-conditional arg-list)
-      (cl-letf (((symbol-function 'y-or-n-p) #'always))
+      (cl-letf (((symbol-function 'y-or-n-p) #'TeX-always))
         (while (and arg-list
                     (setq arg (car arg-list)))
           (if (and (listp arg) (eq (car arg) 'TeX-arg-conditional))
diff --git a/tex.el b/tex.el
index 7974698069..a85b8ef9d5 100644
--- a/tex.el
+++ b/tex.el
@@ -4779,6 +4779,16 @@ Return nil if ELT is not a member of LIST."
 (make-obsolete 'TeX-assoc
                "use (assoc-string KEY LIST t) instead." "AUCTeX 13.0")
 
+(if (>= emacs-major-version 28)
+    (defalias 'TeX-always #'always)
+  (defun TeX-always (&rest _arguments)
+    "Ignore ARGUMENTS, do nothing and return t.
+This function accepts any number of arguments in ARGUMENTS.
+Also see `ignore'.
+
+This is a compatibility function for Emacs versions prior to v.28."
+    t))
+
 (defun TeX-match-buffer (n)
   "Return the substring corresponding to the N'th match.
 See `match-data' for details."




reply via email to

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