[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 28
From: |
Arash Esbati |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 284d1be0967665170073d7574ca5bab7c9f59025 |
Date: |
Fri, 16 Oct 2020 13:59:49 -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 284d1be0967665170073d7574ca5bab7c9f59025 (commit)
from c2f046235a8a40c686e1196b6845a43c451f2809 (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 284d1be0967665170073d7574ca5bab7c9f59025
Author: Arash Esbati <arash@gnu.org>
Date: Fri Oct 16 19:58:32 2020 +0200
Put point after the graphic file argrument
* style/graphicx.el (LaTeX-includegraphics-extensions): Delimit
the regexp with \\' instead of $.
(LaTeX-arg-includegraphics): Rewrite the function in order to
comply with AUCTeX insertion hooks. Put point after the braced
group once the file argument in inserted into buffer.
diff --git a/style/graphicx.el b/style/graphicx.el
index c24ee21..be918bd 100644
--- a/style/graphicx.el
+++ b/style/graphicx.el
@@ -171,7 +171,7 @@ Optional argument LIST if non-nil is used as list of
regexps of
extensions to be matched."
(unless list
(setq list (LaTeX-includegraphics-extensions-list)))
- (concat "\\." (mapconcat #'identity list "$\\|\\.") "$"))
+ (concat "\\." (mapconcat #'identity list "\\'\\|\\.") "\\'"))
(defvar LaTeX-includegraphics-global-files nil
"List of the non-local graphic files to include in LaTeX documents.
@@ -213,21 +213,16 @@ subdirectories and inserts the relative file name. See
(string-match (LaTeX-includegraphics-extensions) fname))))
(TeX-master-directory)))
-(defun LaTeX-arg-includegraphics (_prefix)
+(defun LaTeX-arg-includegraphics (optional)
"Ask for mandantory argument for the \\includegraphics command."
- (let* ((image-file (funcall LaTeX-includegraphics-read-file)))
- (TeX-insert-braces 0)
- (insert
+ (let ((image-file (funcall LaTeX-includegraphics-read-file)))
+ (TeX-argument-insert
(if LaTeX-includegraphics-strip-extension-flag
- ;; We don't have `replace-regexp-in-string' in all (X)Emacs versions:
- (with-temp-buffer
- (insert image-file)
- (goto-char (point-max))
- (when (search-backward-regexp (LaTeX-includegraphics-extensions)
- nil t 1)
- (replace-match ""))
- (buffer-string))
- image-file))))
+ (replace-regexp-in-string (LaTeX-includegraphics-extensions)
+ ""
+ image-file)
+ image-file)
+ optional)))
(TeX-add-style-hook
"graphicx"
-----------------------------------------------------------------------
Summary of changes:
style/graphicx.el | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 284d1be0967665170073d7574ca5bab7c9f59025,
Arash Esbati <=