From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53342 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: message mode loses highlighting Date: Mon, 07 Jul 2003 10:36:30 -0400 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nbrw62ykx.fsf@lockgroove.bwh.harvard.edu> References: <4n3chyi2sv.fsf@lockgroove.bwh.harvard.edu> <4nsmpxwitr.fsf@lockgroove.bwh.harvard.edu> <4n7k79vzjy.fsf@lockgroove.bwh.harvard.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1057588642 7123 80.91.224.249 (7 Jul 2003 14:37:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Jul 2003 14:37:22 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M1886@lists.math.uh.edu Mon Jul 07 16:37:18 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ZX7G-0001qH-00 for ; Mon, 07 Jul 2003 16:37:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19ZX7C-0006bq-00; Mon, 07 Jul 2003 09:37:14 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19ZX78-0006bl-00 for ding@lists.math.uh.edu; Mon, 07 Jul 2003 09:37:10 -0500 Original-Received: (qmail 89546 invoked by alias); 7 Jul 2003 14:37:10 -0000 Original-Received: (qmail 89541 invoked from network); 7 Jul 2003 14:37:04 -0000 Original-Received: from clifford.bwh.harvard.edu (134.174.9.41) by sclp3.sclp.com with SMTP; 7 Jul 2003 14:37:04 -0000 Original-Received: from lockgroove.bwh.harvard.edu (lockgroove [134.174.9.133]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id h67EaUI03698; Mon, 7 Jul 2003 10:36:30 -0400 (EDT) Original-Received: (from tzz@localhost) by lockgroove.bwh.harvard.edu (8.11.6+Sun/8.11.0) id h67EaUT27832; Mon, 7 Jul 2003 10:36:30 -0400 (EDT) Original-To: Katsumi Yamaoka X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Katsumi Yamaoka , ding@gnus.org In-Reply-To: (Katsumi Yamaoka's message of "Tue, 01 Jul 2003 21:02:30 +0900") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (usg-unix-v) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53342 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53342 On Tue, 01 Jul 2003, yamaoka@jpl.org wrote: >>>>>> In <4n7k79vzjy.fsf@lockgroove.bwh.harvard.edu> >>>>>> Ted Zlatanov wrote: >=20 >> What I posted is the only customization involving fontlock I have. >> In any case, add-keywords should not override any other font >> locking, according to the docs, that's why I'm puzzled. >=20 > If you use turn-on-font-lock for the message-mode, replace it > with `(lambda nil (font-lock-mode 1))' and your message buffer > will revive. :) This is my current function: (defun tzz-highlighting-install () (interactive) (font-lock-mode t) (font-lock-add-keywords nil=20 `(("^\\([^-A-Za-z0-9]+\\)$" (0 'font-lock-empty-line-face)) ("\n" (0 'font-lock-empty-line-face)) ("\\(FIXME\\|TODO\\)" (1 'font-lock-warning-face prepend))))) According to the docs, font-lock-mode works the same with the t and the 1 parameters, so what you suggest shouldn't make a difference. > Since message-mode is derived from text-mode as Johan Bockg=E5rd > said, font-lock is first turned on for the text-mode and only > keywords for the text-mode are used. When font-lock has already > been turned on, even if turn-on-font-lock is performed for the > message-mode, nothing changes (see font-lock.el). Hmm, so how can I do what I need to do? Maybe I can detect message-mode and when it's active, skip execution of the font-lock machinery above? It would be better for me, however, to have the highlighting in message-mode as well. Thanks for your help Ted