* example of multi-line font-locking
@ 2012-02-26 14:39 Le Wang
2012-02-26 21:53 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Le Wang @ 2012-02-26 14:39 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
Hi,
I asked this question on stackoverflow:
http://stackoverflow.com/questions/9452615/emacs-is-there-a-clear-example-of-multi-line-fontlocking
Can anyone point me to an example of how to use the features described in
the manual?
--
Le
[-- Attachment #2: Type: text/html, Size: 395 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: example of multi-line font-locking
2012-02-26 14:39 example of multi-line font-locking Le Wang
@ 2012-02-26 21:53 ` Stefan Monnier
2012-02-27 3:31 ` Le Wang
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2012-02-26 21:53 UTC (permalink / raw)
To: Le Wang; +Cc: emacs-devel
> I asked this question on stackoverflow:
> http://stackoverflow.com/questions/9452615/emacs-is-there-a-clear-example-of-multi-line-fontlocking
> Can anyone point me to an example of how to use the features described in
> the manual?
Which feature? There are various.
Most of the "multiline font locking" features are aimed at solving the
situation were a single font-lock rule can match a chunk of text that
spans several lines (e.g. putting a bold font on text within
"\textbf{...}").
For your case (of highlighting the CSS or Javascript part of an HTML
buffer), I think that a "multi-major-mode" approach is more promising,
tho this is an even harder problem to solve than mere multiline
font locking.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: example of multi-line font-locking
2012-02-26 21:53 ` Stefan Monnier
@ 2012-02-27 3:31 ` Le Wang
0 siblings, 0 replies; 3+ messages in thread
From: Le Wang @ 2012-02-27 3:31 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
On Mon, Feb 27, 2012 at 5:53 AM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:
> > I asked this question on stackoverflow:
> >
> http://stackoverflow.com/questions/9452615/emacs-is-there-a-clear-example-of-multi-line-fontlocking
>
> > Can anyone point me to an example of how to use the features described in
> > the manual?
>
> Which feature? There are various.
>
This section of the manual:
http://www.gnu.org/software/emacs/manual/html_node/elisp/Multiline-Font-Lock.htmllacks
an example that ties it all together, IMO.
Most of the "multiline font locking" features are aimed at solving the
> situation were a single font-lock rule can match a chunk of text that
> spans several lines (e.g. putting a bold font on text within
> "\textbf{...}").
>
> For your case (of highlighting the CSS or Javascript part of an HTML
> buffer), I think that a "multi-major-mode" approach is more promising,
> tho this is an even harder problem to solve than mere multiline
> font locking.
>
I'm sorry. I realize now that my question was unclear. I don't want mode
specific highlighting within javascript/css chunks. I only want to see
that the chunks are there by applying a face with a slightly different
background. So this is simply a problem of multiline font-locking.
--
Le
[-- Attachment #2: Type: text/html, Size: 2264 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-27 3:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-26 14:39 example of multi-line font-locking Le Wang
2012-02-26 21:53 ` Stefan Monnier
2012-02-27 3:31 ` Le Wang
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).