]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix yaml-ts-mode comment-start-skip to improve commenting/uncommenting
authorJames Cherti <contact@jamescherti.com>
Tue, 24 Jun 2025 17:25:40 +0000 (13:25 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 19:19:00 +0000 (21:19 +0200)
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Fix 'comment-start-skip'
value to resolve an issue when commenting/uncommenting using the
'comment-or-uncomment-region' function.  The previous 'comment-start-skip'
value left some "-" uncommented after commenting and uncommenting
multiple YAML indented blocks (bug#78892).

Copyright-paperwork-exempt: yes
(cherry picked from commit faae9f572ab3027c46800575a12a72c8c0eee7c1)

lisp/textmodes/yaml-ts-mode.el

index 58ed06de8860dd9b5ef83d423061244f8c068429..cadae19af1eaca1b153393257a48bbc3681bcc97 100644 (file)
@@ -187,7 +187,7 @@ Return nil if there is no name or if NODE is not a defun node."
     ;; Comments.
     (setq-local comment-start "# ")
     (setq-local comment-end "")
-    (setq-local comment-start-skip "#+\\s-*")
+    (setq-local comment-start-skip "#+ *")
 
     ;; Indentation.
     (setq-local indent-tabs-mode nil)