From 037f071442e72572db0969161651a460525b6c30 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 11 Aug 2024 17:02:38 +0200 Subject: [PATCH] ; Fix cherry-picking of recent 'c-ts-*' changes --- lisp/progmodes/c-ts-common.el | 4 +++- lisp/progmodes/c-ts-mode.el | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 740c5e28747..f68a6dc108d 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -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)) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index ad3e99b5d1f..7f23b30a88a 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -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" -- 2.39.2