]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Fix wrong value of comment-start-skip, fixing half of bug #41952
authorAlan Mackenzie <acm@muc.de>
Sat, 4 Jul 2020 11:56:18 +0000 (11:56 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 4 Jul 2020 11:56:18 +0000 (11:56 +0000)
commit697942f9a0d875cb8b00e6de155a34354db1dcba
tree13994bc9acd3de48cb826b6425f8f793e1fe66ab
parent32b3856f850e1721b3be23b50f4b90f9f59fee8a
CC Mode: Fix wrong value of comment-start-skip, fixing half of bug #41952

Also add functions to enable correct use of CC Mode's filling functionality
from major modes which don't initialize CC Mode fully.  These modes are
currently js-mode and mhtml-mode.

* lisp/progmodes/cc-langs.el (comment-start-skip): Replace "\\(" by "\\(?:" so
that (match-end 1) isn't falsely taken to be the start of the comment.

* lisp/progmodes/cc-engine.el (c-foreign-truncate-lit-pos-cache)
(c-foreign-init-lit-pos-cache): New functions.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el