[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use `narrow'?
From: |
Ilya Zakharevich |
Subject: |
Re: How to use `narrow'? |
Date: |
Tue, 18 Oct 2005 08:47:59 +0000 (UTC) |
User-agent: |
trn [how to get a version via %-escapes???] with a custom header |
[A complimentary Cc of this posting was sent to
Gian Uberto Lauri
<saint@eng.it>], who wrote in article
<mailman.11713.1129623266.20277.help-gnu-emacs@gnu.org>:
> IZ> My idea how *I* would use `narrow' is like this:
> IZ> Suppose I have a file which is "in multiple modes".
...
> IZ> So I would like to narrow to the region "inside the
> IZ> HERE-document", and switch the mode to "other mode" (above, from
> IZ> CPerl mode to JavaScript mode).
> ...
> IZ> However, I looked, and `font-lock' does `widen' before it starts
> IZ> up; so all the effect of narrowing is gone... Is there any *use*
> IZ> of narrowing?
>
> font-lock widens then narrows, afaik.
> So what's narrowed stays narrowed at least for what concerns the user.
Eh??? There is no narrowing in font-lock (except some for C modes).
Thus fontification is based on the whole contents of the buffer (which
is multi-mode, thus can't be parsed by Emacs).
Yours,
Ilya