unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* fontifying emacs w3m view source buffer
@ 2005-03-17 18:04 Peter K. Lee
  2005-03-17 20:33 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Peter K. Lee @ 2005-03-17 18:04 UTC (permalink / raw)


I'm doing some server-side web stuff, and was using emacs-w3m mode to
verify generated HTML text.

I wanted to know if there were existing hooks or calls from other
emacs packages to fontify the w3m view source buffer (since it's just
HTML after all).

Since I was using NXML for authoring, I tried adding something like
the following...

(defun saint/w3m-nxml-view (url)
  "Suitable for adding to `w3m-display-hook'."
  (if (string-match "\\`about://source/" url)
	  (progn
		(require 'nxml-mode)
        (nxml-mode))))
(add-hook 'w3m-display-hook 'saint/w3m-nxml-view)

which does work in fontifying buffer, but you're thrown out of w3m
mode completely.

(defun saint/w3m-nxml-view (url)
  "Suitable for adding to `w3m-display-hook'."
  (if (string-match "\\`about://source/" url)
	  (progn
		(require 'nxml-mode)
        (nxml-fontify-buffer))))
(add-hook 'w3m-display-hook 'saint/w3m-nxml-view)

I then tried the above, but call to nxml-fontify-buffer does not seem
to work.

Any suggestions?

TIA,

Peter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-17 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).