From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/17619 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.user Subject: Re: font-locked Gnus browse server Date: Mon, 18 May 2015 13:35:11 +0200 Message-ID: <87zj526rv4.fsf@gnu.org> References: <878ucwhw7g.fsf@debian.uxu> <874mngfabn.fsf@debian.uxu> <878ucqgchs.fsf@debian.uxu> <87oalkfc4o.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1431948952 29492 80.91.229.3 (18 May 2015 11:35:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 May 2015 11:35:52 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Mon May 18 13:35:43 2015 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YuJKg-0004Yw-Cv for gegu-info-gnus-english@m.gmane.org; Mon, 18 May 2015 13:35:42 +0200 Original-Received: from localhost ([::1]:40280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuJKa-0002wc-Qw for gegu-info-gnus-english@m.gmane.org; Mon, 18 May 2015 07:35:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuJKV-0002wT-MX for info-gnus-english@gnu.org; Mon, 18 May 2015 07:35:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuJKQ-0005dn-TR for info-gnus-english@gnu.org; Mon, 18 May 2015 07:35:31 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:46328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuJKQ-0005dW-Mi for info-gnus-english@gnu.org; Mon, 18 May 2015 07:35:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YuJKM-0004Rj-7B for info-gnus-english@gnu.org; Mon, 18 May 2015 13:35:22 +0200 Original-Received: from dhcp79.uni-koblenz.de ([141.26.71.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 May 2015 13:35:22 +0200 Original-Received: from tsdh by dhcp79.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 May 2015 13:35:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dhcp79.uni-koblenz.de User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:56U0+bkDKV1P9FWWQsJBQNB3A+o= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:17619 Archived-At: Emanuel Berg writes: >> Yes, this could also work. BTW, `font-lock-defaults' >> is automatically buffer-local, no need to make >> it so. > > Check out `gnus-server-mode' - gnus-srvr.el, which > I have as > > /usr/share/emacs/24.4/lisp/gnus/gnus-srvr.el > > line 263: > > (set (make-local-variable 'font-lock-defaults) ; ... Maybe it hasn't been buffer-local by default in Emacs 18, and that's a relict of that time. >>> With MODE as nil the font lock is done one the >>> basis of the current buffer. It is not related to >>> the mode itself apart from the invocation being >>> placed in the mode entry hook. This means the >>> keywords have to be added every time the mode >>> is entered. >> >> Yes, but that doesn't make a difference, no? > > All three solutions are equally bad in that all rely > on the hook. > > The best solution would be to change > `gnus-browse-mode' to do what gnus-server-mode does so > `font-lock-defaults' is set and one only has to bother > with the colors in an ordinary init file and can drop > the hook. Of course, that would be legit. Bye, Tassilo