GNU bug report logs -
#41897
28.0.50; JavaScript comment filling with mhtml-mode
Previous Next
Reported by: Simen Heggestøyl <simenheg <at> runbox.com>
Date: Tue, 16 Jun 2020 17:10:01 UTC
Severity: normal
Found in version 28.0.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 41897 <at> debbugs.gnu.org (full text, mbox):
Hi Alan,
On 22.06.2020 22:17, Alan Mackenzie wrote:
> +(defun c-foreign-truncate-lit-pos-cache (beg _end)
> + "Truncate CC Mode's literal cache.
> +
> +This function should be added to the `before-change-functions'
> +hook by major modes that use CC Mode's filling functionality
> +without initializing CC Mode. Currently (2020-06) these are
> +js-mode and mhtml-mode."
> + (c-truncate-lit-pos-cache beg))
Could you explain this part?
Is that literal cache looked up once during filling, or is it used
multiple times during the execution of c-fill-paragraph? If the latter
(and it does serve as a cache this way), perhaps it could be cleared
once, at the beginning of c-fill-paragraph, instead of adding a runtime
cost to every edit?
Or if that's undesirable, js-fill-paragraph could do that.
This way, I think it would automatically make it compatible with
mmm-mode. Or at least more compatible.
This bug report was last modified 5 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.