From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter K. Lee Newsgroups: gmane.emacs.help Subject: fontifying emacs w3m view source buffer Date: Thu, 17 Mar 2005 10:04:16 -0800 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111089860 15160 80.91.229.2 (17 Mar 2005 20:04:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2005 20:04:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 17 21:04:19 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DC1DL-00077e-VV for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Mar 2005 21:03:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DC1Tg-0005QJ-67 for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Mar 2005 15:20:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!feed.news.tiscali.de!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: 209.182.100.49 Original-X-Trace: quimby.gnus.org 1111089280 5116 209.182.100.49 (17 Mar 2005 19:54:40 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Thu, 17 Mar 2005 19:54:40 +0000 (UTC) User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:aUACxRcW0HBrfMEDaYiySrydN5k= Original-Xref: shelby.stanford.edu gnu.emacs.help:129347 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:24902 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24902 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