From 74e715cb72900143cd9c2f8c58edb88431941d85 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Thu, 2 Feb 2023 14:48:22 -0800 Subject: [PATCH] ; Go back to original point when filling comments in c-ts-mode * lisp/progmodes/c-ts-common.el: (c-ts-common--fill-block-comment): Go to original point. --- lisp/progmodes/c-ts-common.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index fd16c9713a5..05997e8bd20 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -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. -- 2.39.2