[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to use `narrow'?
From: |
Ilya Zakharevich |
Subject: |
How to use `narrow'? |
Date: |
Tue, 18 Oct 2005 02:09:51 +0000 (UTC) |
User-agent: |
trn [how to get a version via %-escapes???] with a custom header |
My idea how *I* would use `narrow' is like this:
Suppose I have a file which is "in multiple modes". E.g., consider
some "literate programming" style text, or one which contains a
HERE-document with a program in a different language than the main
text of the document:
$var = <<EOV; # E.g., this is Perl
// Here is some code in JavaScript
...
EOV
So I would like to narrow to the region "inside the HERE-document",
and switch the mode to "other mode" (above, from CPerl mode to
JavaScript mode).
However, I looked, and `font-lock' does `widen' before it starts up;
so all the effect of narrowing is gone... Is there any *use* of
narrowing?
Thanks,
Ilya
P.S. I ask this since now CPerl has a (contributed) code to
`narrow-to-here-doc', and I would like to document why this would
be useful...
Re: How to use `narrow'?, Anselm Helbig, 2005/10/18