unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Peter K. Lee <saint@corenova.com>
Subject: Re: fontifying emacs w3m view source buffer
Date: Thu, 17 Mar 2005 13:05:29 -0800	[thread overview]
Message-ID: <m31xae2dba.fsf@corenova.com> (raw)
In-Reply-To: 7ezmx2xb9s.fsf@ada2.unipv.it

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	other threads:[~2005-03-17 21:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 18:04 fontifying emacs w3m view source buffer Peter K. Lee
2005-03-17 20:33 ` Thien-Thi Nguyen
2005-03-17 21:05   ` Peter K. Lee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31xae2dba.fsf@corenova.com \
    --to=saint@corenova.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).