[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 163dcb75bd0b67e850b9e
From: |
Ikumi Keita |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 163dcb75bd0b67e850b9e4c4f3ba2f2d310360a0 |
Date: |
Thu, 24 Feb 2022 06:07:59 -0500 (EST) |
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, master has been updated
via 163dcb75bd0b67e850b9e4c4f3ba2f2d310360a0 (commit)
from e625dc05ea31846ee0aaffde7104602bea22b581 (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 163dcb75bd0b67e850b9e4c4f3ba2f2d310360a0
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date: Thu Feb 25 00:47:01 2021 +0900
Fix label insertion at env. insertion with active region (bug#28382)
* latex.el (LaTeX-env-label): Add management of positions of point and
mark and indent region when region is active.
diff --git a/latex.el b/latex.el
index 27c865a4..bfd5b8c6 100644
--- a/latex.el
+++ b/latex.el
@@ -1274,9 +1274,18 @@ Just like array and tabular."
(defun LaTeX-env-label (environment)
"Insert ENVIRONMENT and prompt for label."
(LaTeX-insert-environment environment)
+ (when (TeX-active-mark)
+ ;; Point is at the end of the region. Move it back to the
+ ;; beginning of the region.
+ (exchange-point-and-mark)
+ (indent-according-to-mode))
(when (LaTeX-label environment 'environment)
(LaTeX-newline)
- (indent-according-to-mode)))
+ (indent-according-to-mode))
+ (when (TeX-active-mark)
+ (indent-region (point) (mark))
+ ;; Restore the positions of point and mark.
+ (exchange-point-and-mark)))
(defun LaTeX-env-list (environment)
"Insert ENVIRONMENT and the first item."
-----------------------------------------------------------------------
Summary of changes:
latex.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 163dcb75bd0b67e850b9e4c4f3ba2f2d310360a0,
Ikumi Keita <=