From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53349 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: message mode loses highlighting Date: Tue, 08 Jul 2003 11:34:18 +0900 Organization: Emacsen advocacy group Sender: ding-owner@lists.math.uh.edu Message-ID: References: <4n3chyi2sv.fsf@lockgroove.bwh.harvard.edu> <4nsmpxwitr.fsf@lockgroove.bwh.harvard.edu> <4n7k79vzjy.fsf@lockgroove.bwh.harvard.edu> <4nbrw62ykx.fsf@lockgroove.bwh.harvard.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1057631707 24342 80.91.224.249 (8 Jul 2003 02:35:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Jul 2003 02:35:07 +0000 (UTC) Original-X-From: ding-owner+M1893@lists.math.uh.edu Tue Jul 08 04:35:05 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 19ZiJO-0006It-00 for ; Tue, 08 Jul 2003 04:34:34 +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 19ZiJR-0008Le-00; Mon, 07 Jul 2003 21:34:37 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19ZiJI-0008LW-00 for ding@lists.math.uh.edu; Mon, 07 Jul 2003 21:34:29 -0500 Original-Received: (qmail 18039 invoked by alias); 8 Jul 2003 02:34:28 -0000 Original-Received: (qmail 18034 invoked from network); 8 Jul 2003 02:34:28 -0000 Original-Received: from unknown (HELO minsk.hostforweb.net) (139.81.163.140) by sclp3.sclp.com with SMTP; 8 Jul 2003 02:34:28 -0000 Original-Received: from yamaokac by minsk.hostforweb.net with local (Exim 3.36 #1) id 19ZiJR-00062o-00 for ding@gnus.org; Mon, 07 Jul 2003 22:34:37 -0400 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:T5OACqLixyK00XCUhipplnmfywU= X-Payment: hashcash 1.2 0:030708:ding@gnus.org:b11b41fff93b8098 X-Hashcash: 0:030708:ding@gnus.org:b11b41fff93b8098 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - minsk.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [32531 32531] / [32531 32531] X-AntiAbuse: Sender Address Domain - minsk.hostforweb.net Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53349 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53349 Hi, >>>>> In <4nbrw62ykx.fsf@lockgroove.bwh.harvard.edu> >>>>> Ted Zlatanov wrote: > This is my current function: > (defun tzz-highlighting-install () [...] I'm well aware of that. How did you use to turn on font-lock in a messege buffer (before using it)? AFAIK, Gnus doesn't turn on font-lock for the message-mode by default, except for XEmacs. So, I'm using the following code: (cond ((featurep 'xemacs) ) (t (add-hook 'message-mode-hook 'turn-on-font-lock))) If the tzz-highlighting-install function is only the way to turn on font-lock for the message-mode (by way of the text-mode), the value of the message-font-lock-keywords variable will never be regarded. It was mentioned in my last message as follows: >> font-lock is first turned on for the text-mode and only keywords >> for the text-mode are used. > 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. You are right. The tzz- function will surely turn on font-lock for the *text-mode* and it will be still turned on for the message-mode. Even so, the message-font-lock-keywords variable will still be ignored. What you should do is to add the following hook in order to turn on font-lock again for the *message-mode*. For that purpose, it is necessary to use `(font-lock-mode 1)' rather than `turn-on-font-lock' since t-o-f-l does nothing if font-lock is already turned on: (add-hook 'message-mode-hook (lambda nil (font-lock-mode 1))) P.S. Sorry for my funny English. I am a sophisticated writer in Japanese, but not in English. ;-) -- Katsumi Yamaoka