|
From: | Dmitry Gutov |
Subject: | bug#41897: 28.0.50; JavaScript comment filling with mhtml-mode |
Date: | Tue, 23 Jun 2020 03:02:48 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |