[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 32
From: |
Ikumi Keita |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 3268e848c11d57cca9c6d763573769a816663146 |
Date: |
Fri, 11 Sep 2020 12:52:28 -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 3268e848c11d57cca9c6d763573769a816663146 (commit)
from 801b5d466c4badc037aca073b338c930828004b3 (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 3268e848c11d57cca9c6d763573769a816663146
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date: Sat Sep 12 01:44:18 2020 +0900
; Trivial cleanups
* tex-buf.el (TeX-command-expand): Omit one `let'.
(TeX--master-or-region-file-with-extra-quotes): Omit spurious `funcall'.
Add descriptions about arguments in doc-string.
* tex.el (declare-function): Fix arglist for updated
`TeX-command-expand'.
diff --git a/tex-buf.el b/tex-buf.el
index b9d9085..134bf36 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -550,48 +550,47 @@ without further expansion."
"%"))
(or list (TeX-expand-list)))
pat (regexp-opt (mapcar #'car list)))
- (let ((file-fn #'TeX--master-or-region-file-with-extra-quotes))
- (while (setq TeX-expand-pos (string-match pat TeX-expand-command
TeX-expand-pos))
- (setq string (match-string 0 TeX-expand-command)
- entry (assoc string list)
- expansion (car (cdr entry)) ;Second element
- arguments (cdr (cdr entry)) ;Remaining elements
- string (save-match-data
- (cond
- ((memq expansion (list 'TeX-active-master
- #'TeX-active-master))
- (let ((res (apply file-fn arguments)))
- ;; Advance past the file name in order to
- ;; prevent expanding any substring of it.
- (setq TeX-expand-pos
- (+ TeX-expand-pos (length res)))
- res))
- ((functionp expansion)
- (apply expansion arguments))
- ((boundp expansion)
- (apply (symbol-value expansion) arguments))
- (t
- (error "Nonexpansion %s" expansion)))))
- (if (stringp string)
- (setq TeX-expand-command
- (replace-match string t t TeX-expand-command))))
- TeX-expand-command)))
+ (while (setq TeX-expand-pos (string-match pat TeX-expand-command
TeX-expand-pos))
+ (setq string (match-string 0 TeX-expand-command)
+ entry (assoc string list)
+ expansion (car (cdr entry)) ;Second element
+ arguments (cdr (cdr entry)) ;Remaining elements
+ string (save-match-data
+ (cond
+ ((eq expansion #'TeX-active-master)
+ (let ((res (apply
#'TeX--master-or-region-file-with-extra-quotes arguments)))
+ ;; Advance past the file name in order to
+ ;; prevent expanding any substring of it.
+ (setq TeX-expand-pos
+ (+ TeX-expand-pos (length res)))
+ res))
+ ((functionp expansion)
+ (apply expansion arguments))
+ ((boundp expansion)
+ (apply (symbol-value expansion) arguments))
+ (t
+ (error "Nonexpansion %s" expansion)))))
+ (if (stringp string)
+ (setq TeX-expand-command
+ (replace-match string t t TeX-expand-command))))
+ TeX-expand-command))
(defun TeX--master-or-region-file-with-extra-quotes
(&optional extension nondirectory ask extra)
"Return the current master or region file name with quote for shell.
-I.e. it encloses the file name with space within quotes `\"'
-first when \" \\input\" is supplemented (indicated by dynamically
-binded variable `TeX-command-text' having string value.) It also
-encloses the file name within \\detokenize{} when the following
-three conditions are met:
+Pass arguments EXTENSION NONDIRECTORY ASK to `TeX-active-master'.
+If the returned file name contains space, enclose it within
+quotes `\"' when \" \\input\" is supplemented (indicated by
+dynamically bound variable `TeX-command-text' having string
+value.) Also enclose the file name within \\detokenize{} when
+the following three conditions are met:
1. compiling with standard (pdf)LaTeX or upLaTeX
2. \" \\input\" is supplemented
3. EXTRA is non-nil (default when expanding \"%T\")
Helper function of `TeX-command-expand'."
(shell-quote-argument
- (let* ((raw (funcall #'TeX-active-master extension nondirectory ask))
+ (let* ((raw (TeX-active-master extension nondirectory ask))
;; String `TeX-command-text' means that the file name is
;; given through \input command.
(quote-for-space (if (and (stringp TeX-command-text)
diff --git a/tex.el b/tex.el
index ce31831..efcb8e1 100644
--- a/tex.el
+++ b/tex.el
@@ -53,7 +53,7 @@
(declare-function TeX-output-extension "tex-buf"
nil)
(declare-function TeX-command-expand "tex-buf"
- (command file &optional list))
+ (command &optional list))
(declare-function TeX-active-master "tex-buf"
(&optional extension nondirectory ignore))
(declare-function TeX-pop-to-buffer "tex-buf"
-----------------------------------------------------------------------
Summary of changes:
tex-buf.el | 63 +++++++++++++++++++++++++++++++-------------------------------
tex.el | 2 +-
2 files changed, 32 insertions(+), 33 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 3268e848c11d57cca9c6d763573769a816663146,
Ikumi Keita <=