[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 19cdfe0 22/62: Put point after th
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 19cdfe0 22/62: Put point after the graphic file argrument |
Date: |
Sun, 20 Dec 2020 10:39:55 -0500 (EST) |
branch: externals/auctex
commit 19cdfe0b3af75eb6a3e9fc9401bacf67e7854906
Author: Arash Esbati <arash@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
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.
---
style/graphicx.el | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
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"
- [AUCTeX-diffs] [elpa] externals/auctex updated (a18be78 -> b41e063), Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 9656d30 21/62: Fix insertion of unnecessary backslash, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex f7c0c73 01/62: Enable lexical-binding for AUCTeX core files, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 8951549 04/62: ; Trivial cleanups, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 2e196d2 07/62: ; Silence the compiler, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 717e5f0 06/62: Simplify nested `let's, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 96c945a 11/62: Remove `TeX-arg-none', Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex c3b76ca 18/62: * tex-ispell.el: Enable lexical-binding., Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 42f061a 17/62: Improve style/amsthm.el, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 00b2d73 12/62: Add missing argument to function body, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 19cdfe0 22/62: Put point after the graphic file argrument,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex dabe30c 02/62: Arrange test condition, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 9d0ccc1 13/62: Update style/fancyvrb.el to package version 3.6, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 5bffc24 24/62: ; * font-latex.el (font-latex-update-math-env): Fix docstring., Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 384c1d2 08/62: Use declared dynamic variable in tex-jp, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 237f409 26/62: ; Suppress warning about obsolete inactivate-input-method, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 08d01c1 19/62: ; * style/changelog.el: Silence the compiler for `reftex-label-alist'., Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex c4583f0 15/62: ; * tests/tex/command-expansion.el: Update copyright year., Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 5c28751 33/62: ; Fix some byte-compiler warnings, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex b42e932 23/62: ; * style/graphicx.el: Fix Ataka-san's name and email., Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 7288b93 31/62: Merge branch 'my-fix' into master, Tassilo Horn, 2020/12/20