]> git.eshelyaron.com Git - emacs.git/commitdiff
; Go back to original point when filling comments in c-ts-mode
authorYuan Fu <casouri@gmail.com>
Thu, 2 Feb 2023 22:48:22 +0000 (14:48 -0800)
committerYuan Fu <casouri@gmail.com>
Fri, 3 Feb 2023 01:39:08 +0000 (17:39 -0800)
* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Go to original point.

lisp/progmodes/c-ts-common.el

index fd16c9713a50f3e8acfa4696a29ad2540491d643..05997e8bd20c4b9968c39dfb462c821a71667390 100644 (file)
@@ -194,7 +194,8 @@ comment."
       (when end-marker
         (goto-char end-marker)
         (delete-region (point) (+ end-len (point)))
-        (insert (make-string end-len ?\s))))))
+        (insert (make-string end-len ?\s)))
+      (goto-char orig-point))))
 
 (defun c-ts-common-comment-setup ()
   "Set up local variables for C-like comment.