[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex bf66b302a4 61/76: Improve the previous commit sl
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex bf66b302a4 61/76: Improve the previous commit slightly |
Date: |
Fri, 13 Jan 2023 14:31:06 -0500 (EST) |
branch: externals/auctex
commit bf66b302a4afa297fc2322a875935fd9a4d47525
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Improve the previous commit slightly
* latex.el (LaTeX-current-environment,LaTeX-backward-up-environment):
Move the task to find out the environment name from the latter to the
former.
---
latex.el | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/latex.el b/latex.el
index 8d181f6982..7c29306642 100644
--- a/latex.el
+++ b/latex.el
@@ -905,16 +905,21 @@ environment in commented regions with the same comment
prefix.
The functions `LaTeX-find-matching-begin' and `LaTeX-find-matching-end'
work analogously."
- (or (save-excursion (LaTeX-backward-up-environment arg t))
- "document"))
+ (save-excursion
+ (if (LaTeX-backward-up-environment arg)
+ (progn
+ (re-search-forward (concat
+ TeX-grop (LaTeX-environment-name-regexp)
+ TeX-grcl))
+ (match-string-no-properties 1))
+ "document")))
-(defun LaTeX-backward-up-environment (&optional arg want-name)
+(defun LaTeX-backward-up-environment (&optional arg)
"Move backward out of the enclosing environment.
Helper function of `LaTeX-current-environment' and
`LaTeX-find-matching-begin'.
With optional ARG>=1, find that outer level.
Return non-nil if the operation succeeded.
-Return the (outermost) environment name if WANT-NAME is non-nil.
Assume the current point is on neither \"begin{foo}\" nor \"end{foo}\"."
(setq arg (if arg (if (< arg 1) 1 arg) 1))
@@ -943,13 +948,7 @@ Assume the current point is on neither \"begin{foo}\" nor
\"end{foo}\"."
(setq arg (if (= (char-after (match-beginning 1)) ?e)
(1+ arg)
(1- arg)))))
- (if (= arg 0)
- (or (not want-name)
- (progn
- (looking-at (concat (regexp-quote TeX-esc) "begin *"
- TeX-grop (LaTeX-environment-name-regexp)
- TeX-grcl))
- (match-string-no-properties 1))))))
+ (= arg 0)))
(defun docTeX-in-macrocode-p ()
"Determine if point is inside a macrocode environment."
- [elpa] externals/auctex 324cb5c913 41/76: Simplify implementation of style/hologo.el, (continued)
- [elpa] externals/auctex 324cb5c913 41/76: Simplify implementation of style/hologo.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 3806176ba2 56/76: Fix argument description in doc strings, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 517d5a6e4e 34/76: ; * style/floatrow.el ("floatrow"): Fix last change., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ac7ad4fff4 36/76: Simplify implementation of style/footmisc.el, 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 c7de94dc94 24/76: Replace `TeX-arg-eval', Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 33bb54bb9e 38/76: Simplify implementation of style/geometry.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 5c67eb2dfd 07/76: Simplify implementation of style/babel.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex e97fb94f4e 62/76: Pacify compiler warning, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 22336f15bd 52/76: Simplify implementation of style/mathtools.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex bf66b302a4 61/76: Improve the previous commit slightly,
Tassilo Horn <=
- [elpa] externals/auctex 5484b57bc4 31/76: Don't rely on the value of `LaTeX-current-environment', Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 1def8bd570 39/76: ; * style/graphics.el ("graphics"): Remove unnecessary `function'., 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 6bdb392dfe 01/76: ; * style/theorem.el ("theorem"): Fix last change., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex eb7b8d4de4 44/76: * style/listings.el ("listings"): Replace `TeX-arg-eval'., 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 83622003aa 46/76: * style/enumitem.el ("enumitem"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 7f9e7ec8a1 05/76: * style/array.el ("array"): Replace `TeX-arg-eval' with a closure., 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 54c82bd093 67/76: New style file physics.el, Tassilo Horn, 2023/01/13