]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix cherry-picking of recent 'c-ts-*' changes
authorEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 15:02:38 +0000 (17:02 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 15:02:38 +0000 (17:02 +0200)
lisp/progmodes/c-ts-common.el
lisp/progmodes/c-ts-mode.el

index 740c5e28747a9cf7318b0da0c8af4f6d01484b03..f68a6dc108de92a425c40089c43c5f9eeec8e045 100644 (file)
@@ -151,7 +151,8 @@ comment."
          (orig-point (point-marker))
          (start-marker (point-marker))
          (end-marker nil)
-         (end-len 0))
+         (end-len 0)
+         (end-mask-done nil))
     (move-marker start-marker start)
     ;; If the first line is /* followed by non-text, exclude this line
     ;; from filling.
@@ -179,6 +180,7 @@ comment."
         (goto-char (match-beginning 1))
         (setq end-marker (point-marker))
         (setq end-len (- (match-end 1) (match-beginning 1)))
+        (setq end-mask-done t)
         (replace-match (make-string end-len ?x)
                        nil nil nil 1))
 
index ad3e99b5d1f81f7f7c6eb9d6363f937ed23373f4..7f23b30a88aaf80f7d7a6ec1a82367408b292cb7 100644 (file)
@@ -1227,7 +1227,9 @@ BEG and END are described in `treesit-range-rules'."
                                    ;; Make sure this doesn't match
                                    ;; storage_class_specifier.
                                    "^class_specifier$"
-                                   "namespace_definition")
+                                   "namespace_definition"
+                                   "preproc_def"
+                                   "preproc_function_def")
                                  (and c-ts-mode-emacs-sources-support
                                       '(;; DEFUN.
                                         "expression_statement"