[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fontifying emacs w3m view source buffer
From: |
Peter K . Lee |
Subject: |
fontifying emacs w3m view source buffer |
Date: |
Thu, 17 Mar 2005 10:04:16 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) |
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
- fontifying emacs w3m view source buffer,
Peter K . Lee <=