[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 47f9ead1c6 44/48: Respect `TeX-exit-mark' when i
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 47f9ead1c6 44/48: Respect `TeX-exit-mark' when inserting enviroments |
Date: |
Fri, 18 Nov 2022 14:27:45 -0500 (EST) |
branch: externals/auctex
commit 47f9ead1c614ff9a9afe474f45b774e589a6fd91
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Respect `TeX-exit-mark' when inserting enviroments
* latex.el (LaTeX--env-parse-args): Set `TeX-exit-mark' to current
point if not set yet. Move point to the position of
`TeX-exit-mark' after parsing the arguments, so hooks can set the
value acc. to their needs.
* tex.el (TeX-exit-mark): Adjust docstring.
---
latex.el | 14 +++++++++-----
tex.el | 2 +-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/latex.el b/latex.el
index eea54db4eb..744257e3c9 100644
--- a/latex.el
+++ b/latex.el
@@ -1062,13 +1062,17 @@ If nil, act like the empty string is given, but do not
prompt."
:type 'string)
(defun LaTeX--env-parse-args (args)
- "Helper function to insert arguments defined by ARGS."
- (save-excursion
+ "Helper function to insert arguments defined by ARGS.
+This function checks if `TeX-exit-mark' is set, otherwise it's
+set to the point where this function starts. Point will be at
+`TeX-exit-mark' when this function exits."
+ (let ((TeX-exit-mark (or TeX-exit-mark
+ (point-marker))))
(LaTeX-find-matching-begin)
(end-of-line)
- (let ((TeX-exit-mark (or TeX-exit-mark
- (make-marker))))
- (TeX-parse-arguments args))))
+ (TeX-parse-arguments args)
+ (goto-char TeX-exit-mark)
+ (set-marker TeX-exit-mark nil)))
(defun LaTeX--env-item (environment)
"Helper function running inside `LaTeX-env-item'.
diff --git a/tex.el b/tex.el
index c5fd9678e6..d74d10d0df 100644
--- a/tex.el
+++ b/tex.el
@@ -3367,7 +3367,7 @@ Space will complete and exit."
(call-interactively #'TeX-insert-macro)))))
(defvar TeX-exit-mark nil
- "Dynamically bound by `TeX-parse-macro' and `LaTeX-env-args'.")
+ "Dynamically bound by `TeX-parse-macro' and `LaTeX--env-parse-args'.")
(defun TeX-parse-macro (symbol args)
"How to parse TeX macros which takes one or more arguments.
- [elpa] externals/auctex b9548da54a 38/48: Simplify implementation of style/tcolorboxlib-theorems.el, (continued)
- [elpa] externals/auctex b9548da54a 38/48: Simplify implementation of style/tcolorboxlib-theorems.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 8e3137f641 15/48: Simplify implementation of style/titlesec.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 20cabef81f 20/48: ; Delete unnecessary `TeX-arg-string', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 49987f08dd 19/48: Provide completion candidates for `TeX-arg-length', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 52738d11b2 39/48: Remove entry in `LaTeX-completion-function-map-alist-keyval', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 8f70cd5211 14/48: Simplify implementation of style/ulem.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex d5ff42e0bd 34/48: Simplify implementation of style/enumitem.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex ff5a83f345 17/48: Simplify implementation of style/thm-restate.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 0ee39626e4 01/48: Use `TeX-arg-completing-read', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 5949388ca2 12/48: Simplify argument queries in style/wrapfig.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 47f9ead1c6 44/48: Respect `TeX-exit-mark' when inserting enviroments,
Tassilo Horn <=
- [elpa] externals/auctex c6c7c3f024 22/48: ; Use #' to quote function, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex c0c9556338 30/48: Don't insert empty node name, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 978ebea1e8 16/48: Simplify implementation of style/thmtools.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex d3970b77da 09/48: ; * latex.el (LaTeX-common-initialization): Remove dupe textcircled., Tassilo Horn, 2022/11/18
- [elpa] externals/auctex a0ba387b2c 23/48: ; Trivial cleanups, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 04a3138c81 45/48: Simplify implementation of style/theorem.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 316550f0bf 29/48: Fix `ConTeXt-add-environments', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 8775c8355f 13/48: Replace `TeX-arg-url-urlstyle' in style/url.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex a7a7209a08 33/48: Extend the argument list of some functions, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex c8d638ac9d 40/48: Use `functionp' to recognize a function, Tassilo Horn, 2022/11/18