auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. a8


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. a88ccc6f3690533239f1646e9ce2826d94f058ed
Date: Sun, 6 Sep 2020 05:11:27 -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, lexical-binding-attempt-1 has been updated
       via  a88ccc6f3690533239f1646e9ce2826d94f058ed (commit)
      from  f7e846ab33b370a8499098a5936333da8205db9d (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 a88ccc6f3690533239f1646e9ce2826d94f058ed
Author: Tassilo Horn <tsdh@gnu.org>
Date:   Sun Sep 6 11:11:05 2020 +0200

    Simplify TeX-command-expand

diff --git a/tex-buf.el b/tex-buf.el
index 2ece8ed..e600e63 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -545,7 +545,7 @@ without further expansion."
         TeX-expand-pos
         TeX-command-text
         TeX-command-pos
-       pat entry expansion-res case-fold-search string expansion arguments)
+       pat entry case-fold-search string expansion arguments)
     (setq list (cons
                (list "%%" (lambda nil
                             (setq TeX-expand-pos (1+ TeX-expand-pos))
@@ -569,23 +569,16 @@ without further expansion."
            expansion (car (cdr entry)) ;Second element
            arguments (cdr (cdr entry)) ;Remaining elements
            string (save-match-data
-                    ;; Note regarding the special casing of `TeX-file-fn':
-                    ;; `TeX-file-fn' is prevented from being evaluated as a
-                    ;; function because inside of AUCTeX it only has a meaning
-                    ;; as a variable.  This makes sure that a function
-                    ;; definition made by an external package (e.g. icicles)
-                    ;; is not picked up.
-                    (cond ((and (not (eq expansion 'TeX-file-fn))
-                                (functionp expansion))
-                           (apply expansion arguments))
+                    (cond ((functionp expansion)
+                            (apply expansion arguments))
                           ((boundp expansion)
-                            (setq expansion-res
-                                  (apply (symbol-value expansion) arguments))
-                            (when (eq expansion 'TeX-file-fn)
+                            (let ((res (apply (symbol-value expansion) 
arguments)))
                               ;; Advance past the file name in order to
                               ;; prevent expanding any substring of it.
-                              (setq TeX-expand-pos (+ TeX-expand-pos (length 
expansion-res))))
-                           expansion-res)
+                              (when (eq expansion 'TeX-file-fn)
+                                (setq TeX-expand-pos
+                                      (+ TeX-expand-pos (length res))))
+                              res))
                           (t
                            (error "Nonexpansion %s" expansion)))))
       (if (stringp string)

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

Summary of changes:
 tex-buf.el | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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