[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 3e8aa71ef2 35/76: Fix bug#58689 with a bit of op
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 3e8aa71ef2 35/76: Fix bug#58689 with a bit of optiomization |
Date: |
Fri, 13 Jan 2023 14:31:02 -0500 (EST) |
branch: externals/auctex
commit 3e8aa71ef28ad05bd32bedf18bbeb4d8cd35c069
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Fix bug#58689 with a bit of optiomization
* latex.el (LaTeX-modify-environment): Comment out redundant
`beginning-of-line' and `end-of-line'.
---
latex.el | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/latex.el b/latex.el
index 69924b2152..04caaf539a 100644
--- a/latex.el
+++ b/latex.el
@@ -871,30 +871,32 @@ position just before \\begin and the position just before
(LaTeX-environment-name-regexp)
"\\)"
(regexp-quote TeX-grcl))
- (save-excursion (beginning-of-line 1)
(point)))))
+ (line-beginning-position))))
(goto-begin (lambda ()
(LaTeX-find-matching-begin)
(prog1 (point)
(re-search-forward (concat (regexp-quote TeX-esc)
"begin"
(regexp-quote TeX-grop)
- "\\("
+ "\\(?:"
(LaTeX-environment-name-regexp)
"\\)"
(regexp-quote TeX-grcl))
- (save-excursion (end-of-line 1)
(point)))))))
+ (line-end-position))))))
(save-excursion
(funcall goto-end)
- (let ((old-env (match-string 1)))
+ (let ((old-env (match-string-no-properties 1))
+ beg-pos)
(replace-match environment t t nil 1)
- (beginning-of-line 1)
- (funcall goto-begin)
+ ;; This failed when \begin and \end lie on the same line. (bug#58689)
+ ;; (beginning-of-line 1)
+ (setq beg-pos (funcall goto-begin))
(replace-match environment t t nil 1)
- (end-of-line 1)
+ ;; (end-of-line 1)
(run-hook-with-args 'LaTeX-after-modify-env-hook
environment old-env
- (save-excursion (funcall goto-begin))
- (progn (funcall goto-end) (point)))))))
+ beg-pos
+ (funcall goto-end))))))
(defvar LaTeX-syntactic-comments) ;; Defined further below.
- [elpa] externals/auctex 7bb6878867 20/76: Simplify implementation of style/CJK.el, (continued)
- [elpa] externals/auctex 7bb6878867 20/76: Simplify implementation of style/CJK.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 3d5ac9cf7a 17/76: Cleanup newcommand/newenvironment support, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 94c28a3214 10/76: Enhance scope environmnent support, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex d55a960018 19/76: Simplify implementation of style/changes.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 1c7a1b582e 23/76: Simplify implementation of style/csquotes.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 28eee191b2 50/76: ; * style/enumitem.el ("enumitem"): Slightly improve last change., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex c60ed913a0 12/76: ; Remove unnecessary `declare-function', Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 7da1860c2a 26/76: Support starred section names, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex d7dc696f47 25/76: * latex.el (LaTeX-env-contents): Add the "nowarn" key., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 7c15b32d06 47/76: Simplify implementation of style/ltugboat.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 3e8aa71ef2 35/76: Fix bug#58689 with a bit of optiomization,
Tassilo Horn <=
- [elpa] externals/auctex 68e14e7ce4 45/76: * style/ltablex.el ("ltablex"): Add fontification support., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 5b73efbfe3 51/76: ; * latex.el (LaTeX-what-macro): Assign values in one go., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex d3ab64f893 60/76: Reduce redundancy in regexp, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex b2b899a450 66/76: ; * style/pstricks.el (LaTeX-package-parameter-value): Pacify compiler., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 22fa670915 55/76: ; Fix doc strings, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex f9b378a45c 70/76: Support detached arguments, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 8984821716 74/76: ; * style/natbib.el ("natbib"): Fontify \citetext., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 0cea7e107a 21/76: Simplify implementation of style/cleveref.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ba70baec6c 27/76: Fix doc strings regarding to section commands, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex a648993763 22/76: * style/comment.el ("comment"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13