help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: fontifying emacs w3m view source buffer


From: Peter K . Lee
Subject: Re: fontifying emacs w3m view source buffer
Date: Thu, 17 Mar 2005 13:05:29 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux)

Thien-Thi Nguyen <ttn@glug.org> writes:

> Peter K. Lee <saint@corenova.com> writes:
>
>> Any suggestions?
>
> check for applicability as you currently do, then, instead of
> changing the mode of the buffer directly, copy its contents to a
> new buffer which you can munge much more freely.  split the
> command into the check and a call to a new function (something
> along the lines of "prettify-html-other-buffer"), so that you can
> use the latter in other contexts.  comment, document, GPL, post.

Well, I didn't have to bother with copying into new buffer and the
like, but I did get it working to my liking.

I found an existing font-lock extension to HTML helper mode, and
modified the w3m-display hook to call the entry point into that
extension.

It works beautifully for HTML, but I figure I could have it do
something similar for other types of view-source files that is NOT
HTML and fontify accordingly.

So, here's the comment, document, GPL, post.

http://home.corenova.com/projects/saint/wiki/EmacsW3MFontifyViewSource

I'll update my wiki page as I enable rest of fontification in w3m view
source mode for other extensions.

-Peter


reply via email to

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