]> git.eshelyaron.com Git - emacs.git/commit
Fix filling in js-mode and mhtml-mode (js-mode parts), fixing bug #41897
authorAlan Mackenzie <acm@muc.de>
Sat, 4 Jul 2020 12:55:49 +0000 (12:55 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 4 Jul 2020 12:55:49 +0000 (12:55 +0000)
commiteae028b9e2c23f84dbd130d49da65f9db1db932f
treeabce20bf8865238e3f471369faaa2cea00a5ef6f
parent697942f9a0d875cb8b00e6de155a34354db1dcba
Fix filling in js-mode and mhtml-mode (js-mode parts), fixing bug #41897

* lisp/progmodes/js.el (js-mode): Use "\\(?:" in the value of
comment-start-skip rather than "\\(", fixing the second half of bug #41952.
Call c-foreign-init-lit-pos-cache and install c-foreign-truncate-lit-pos-cache
on before-change-functions, to connect up correctly with CC Mode's filling
mechanism.

* lisp/textmodes/mhtml-mode.el (mhtml--crucial-variable-prefix): Add prefixes
"adaptive-fill-", "fill-", "normal-auto-fill-function" and "paragraph-" to
pull in variables crucial to filling.
(mhtml-syntax-propertize): Read the current submode from the piece of text
being propertized rather than one character before it, and do so before
erasing the submode text-property.
(mhtml-mode): Set the js-mode value of auto-fill-function to js-do-auto-fill.
Correctly initialize and use CC Mode's filling facilities, as above.
lisp/progmodes/js.el
lisp/textmodes/mhtml-mode.el