emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SUSPECTED SPAM] Re: [Emacs-diffs] scratch/widen-less a4ba846: Repla


From: Dmitry Gutov
Subject: Re: [SUSPECTED SPAM] Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls
Date: Thu, 14 Dec 2017 16:17:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0

On 12/14/17 4:01 PM, Stefan Monnier wrote:

font-lock has always widened (except when font-lock-dont-widen is set,
which AFAICT is only the case in rmail.el), so that's probably why no
major mode widens (CC mode probably widens during font-lock because it
uses functions which are also used in other circumstances where they
need to widen).

So I don't think we need to make any changes on that front.

So, nothing to add to the manual?

Code changes would only be needed in CC Mode, of course.

- Similar info for syntax-propertize-function, though no violators have been
observed so far.

Since there are no current violators, we can fix this part of the doc
when we fix the corresponding code.

OK. The recent change in spss cache also depends on synax-propertize-function not calling widen, BTW.

What is not included, and maybe should wait until Emacs 27:
- Similar consolidations of 'widen' calls for add-log-current-defun,
eldoc-print-current-symbol-info, beginning-of-defun-function and others. And
accompanying documentation (again, where should it go?).

Maybe some of the doc should be in the narrowing section, where we can
document the contexts where the narrowing is "guaranteed"
(e.g. font-lock and indentation).

Hmm. Currently, that page doesn't exactly describe when one should call 'widen', and when shouldn't.

Also, the piece of documentation I'm thinking about will probably need to reference, again, "Some major modes need to support embedded regions of text whose
syntax belongs to a different major mode.  Examples include “literate
programming” source files that combine documentation and snippets of
source code..."; maybe that introduction should leave the Indentation Controlled by Major Mode section, and get a section of its own.

So we can refer to it from several places, at least. Or maybe put all mixed-major-mode considerations in it together.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]