]> git.eshelyaron.com Git - emacs.git/commitdiff
; comment-indent: Leave point where we used to.
authorSean Whitton <spwhitton@spwhitton.name>
Sat, 26 Apr 2025 12:04:43 +0000 (20:04 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Apr 2025 17:36:50 +0000 (19:36 +0200)
(cherry picked from commit 30b7318a8f6c593fc6553a45445e84e4e50cd119)

lisp/newcomment.el

index 28ee4467589ca7ecb39744c3c8b7bf1a30a32490..4da3b55d2f0a757a1e0a5d3fdfffb74b7f6f8cbe 100644 (file)
@@ -726,7 +726,7 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
      ;; are already within a multiline comment at BOL (bug#78003).
      ((and (not begpos) (not continue)
            comment-use-syntax comment-use-global-state
-           (nth 4 (syntax-ppss (line-beginning-position))))
+           (save-excursion (nth 4 (syntax-ppss (line-beginning-position)))))
       ;; We don't know anything about the nature of the multiline
       ;; construct, so immediately delegate to the mode.
       (indent-according-to-mode))