branch: main commit 63609977825c5b6a9cb8dde71e8c7e9928007a39 Merge: ad4f83be 2d60aa26 Author: Tassilo Horn <t...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
Merge branch 'master' into externals/auctex --- latex.el | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/latex.el b/latex.el index fd6459c4..83d50caf 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)