emacs-devel
[Top][All Lists]
Advanced

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

Re: forward-comment and syntax-ppss


From: Stefan Monnier
Subject: Re: forward-comment and syntax-ppss
Date: Mon, 19 Dec 2016 08:12:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> - Likewise for M-x imenu and any similar facilities. Keep widening to the
> commands, or some high level code that is not major
> mode-specific. font-lock-default-fontify-region is a counter-example of
> sorts, but it works for mmm-mode because of font-lock-dont-widen.

But that means any command which somewhere internally uses syntax-ppss
would need to widen?  So any change which introduces a new call to
syntax-ppss would imply revising all callers of this code and all
callers of those callers (etc...) to make sure they widen?

What if they don't want to widen because they're commands which *should*
limit themselves to the narrowed region?

That seems to presume that narrowing is only used for multi-mode kind of
contexts, which currently is the exception rather than the rule.

I think the core of the problem is the use of narrowing for widely
different purposes, so indeed we should decide that some of those uses
are simply inappropriate and provided something else for those uses.

But I think the case "user-level narrow for Q&R" is hard to replace
reliably, so I'd rather keep narrowing for *that* purpose, and try to
introduce something else for the other uses (e.g. for multi-mode).


        Stefan



reply via email to

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