summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-01-12 17:29:14 -0800
committerYuan Fu <casouri@gmail.com>2023-01-13 00:55:24 -0800
commita760364f5f36ad4ded67b0fd5ca4ef59c9b2d705 (patch)
tree2bb5561a4445ab8893a72a0d3336ac73d7101127 /lisp
parent2a2b1d09ac77f66629cb5b968d5f7e6451a2c8a9 (diff)
downloademacs-a760364f5f36ad4ded67b0fd5ca4ef59c9b2d705.tar.gz
emacs-a760364f5f36ad4ded67b0fd5ca4ef59c9b2d705.tar.bz2
emacs-a760364f5f36ad4ded67b0fd5ca4ef59c9b2d705.zip
Fix c-ts-mode--fill-paragraph
Example: doc: /* Return non-nil if NODE1 and NODE2 are the same node. If any one of NODE1 and NODE2 is nil, return nil. This function uses the same equivalence metric as `equal'. */ * lisp/progmodes/c-ts-mode.el (c-ts-mode--fill-paragraph): Fix the case where there are words before the /*, like the example above.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/c-ts-mode.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index e53ed390ba1..ef5a9c2195a 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -726,7 +726,10 @@ ARG is passed to `fill-paragraph'."
;; Let `fill-paragraph' do its thing.
(goto-char orig-point)
(narrow-to-region start end)
- (funcall #'fill-paragraph arg)
+ ;; We don't want to fill the region between START and
+ ;; START-MARKER, otherwise the filling function might delete
+ ;; some spaces there.
+ (fill-region start-marker end arg)
;; Unmask.
(when start-marker
(goto-char start-marker)