[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 2d60aa2 1/3: Fix the fix of bug#47757 which brok
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 2d60aa2 1/3: Fix the fix of bug#47757 which broke comment filling. |
Date: |
Sun, 18 Apr 2021 12:43:58 -0400 (EDT) |
branch: externals/auctex
commit 2d60aa26060692723228aef3b4089d65a3bf0960
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
Fix the fix of bug#47757 which broke comment filling.
* latex.el (LaTeX-back-to-indentation): Move point to the comment
content only if the current command is no newline command (fixes the
previous fix for bug#47757 which broke comment filling).
---
latex.el | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/latex.el b/latex.el
index fd6459c..83d50ca 100644
--- a/latex.el
+++ b/latex.el
@@ -3681,25 +3681,23 @@ outer indentation in case of a commented line. The
symbols
"Move point to the first non-whitespace character on this line.
If it is commented and comments are formatted syntax-aware move
point to the first non-whitespace character after the comment
-character(s), but only if `this-command' is an actual indentation
-command. The optional argument FORCE-TYPE can be used to force
-point being moved to the inner or outer indentation in case of a
-commented line. The symbols 'inner and 'outer are recognized."
+character(s), but only if `this-command' is not a newline
+command, i.e., `TeX-newline' or the value of
+`TeX-newline-function'. The optional argument FORCE-TYPE can be
+used to force point being moved to the inner or outer indentation
+in case of a commented line. The symbols 'inner and 'outer are
+recognized."
(if (or (and force-type
(eq force-type 'inner))
(and (not force-type)
(or (and (TeX-in-line-comment)
(eq major-mode 'doctex-mode))
(and (TeX-in-commented-line)
- ;; Only move after the % if we're actually
- ;; performing an indent command and not, e.g.,
- ;; our `TeX-newline-function' which will be
- ;; invoked automatically by
- ;; `electric-indent-mode' (bug#47757).
- (memq this-command
- `(,indent-line-function
- indent-for-tab-command
- LaTeX-indent-line))
+ ;; Only move after the % if we're not
+ ;; performing a newline command (bug#47757).
+ (not (memq this-command
+ `( TeX-newline
+ ,TeX-newline-function)))
LaTeX-syntactic-comments))))
(progn
(beginning-of-line)