From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37934 Path: main.gmane.org!not-for-mail From: "Joe Casadonte" Newsgroups: gmane.emacs.gnus.general Subject: Font-lock for Server mode Date: 17 Aug 2001 17:27:32 -0400 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035173599 18158 80.91.224.250 (21 Oct 2002 04:13:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:13:19 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 7659 invoked from network); 17 Aug 2001 21:27:18 -0000 Original-Received: from unknown (HELO terrapin.local.northbound-train.com) (216.231.57.205) by gnus.org with SMTP; 17 Aug 2001 21:27:18 -0000 Original-Received: from JCASADONTE (IDENT:root@localhost.localdomain [127.0.0.1]) by terrapin.local.northbound-train.com (8.11.0/8.11.0) with ESMTP id f7HKSSr06930 for ; Fri, 17 Aug 2001 16:28:29 -0400 Original-To: ding-list User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Original-Lines: 70 Xref: main.gmane.org gmane.emacs.gnus.general:37934 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37934 I find myself in the server buffer a couple of times a day, for one reason or another, and I thought a little syntax coloring based on status would be nice. So here it is; include it if you'd like. I'd send in a patch if I knew how (though honestly I only poked around for it; I'm sure there's a command somewhere that I'm missing), but the code can go anywhere, really. Except for the one line that needs to go (somewhere) in `gnus-server-mode': (defun gnus-server-mode () ... (setq buffer-read-only t) => (set (make-local-variable 'font-lock-defaults) '(gnus-server-font-lock-keywords t)) (gnus-run-hooks 'gnus-server-mode-hook)) and the rest: (defface gnus-server-opened-face '((((class color) (background light)) (:foreground "Green3" :bold t)) (((class color) (background dark)) (:foreground "Green1" :bold t)) (t (:bold t))) "Face used for displaying OPENED servers" :group 'gnus-server-faces) (defface gnus-server-closed-face '((((class color) (background light)) (:foreground "Steel Blue" :italic t)) (((class color) (background dark)) (:foreground "Light Steel Blue" :italic t)) (t (:italic t))) "Face used for displaying CLOSED servers" :group 'gnus-server-faces) (defface gnus-server-denied-face '((((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Pink" :bold t)) (t (:inverse-video t :bold t))) "Face used for displaying DENIED servers" :group 'gnus-server-faces) (defvar gnus-server-opened-face 'gnus-server-opened-face "Face name to use on OPENED servers.") (defvar gnus-server-closed-face 'gnus-server-closed-face "Face name to use on CLOSED servers.") (defvar gnus-server-denied-face 'gnus-server-denied-face "Face name to use on DENIED servers.") (defvar gnus-server-font-lock-keywords (list '("(\\(opened\\))" 1 gnus-server-opened-face) '("(\\(closed\\))" 1 gnus-server-closed-face) '("(\\(denied\\))" 1 gnus-server-denied-face) )) -- Regards, joe Joe Casadonte jcasadonte@northbound-train.com ------------------------------------------------------------------------------ Llama Fresh Farms => http://www.northbound-train.com Gay Media Resource List => http://www.northbound-train.com/gaymedia.html Perl for Win32 => http://www.northbound-train.com/perlwin32.html Emacs Stuff => http://www.northbound-train.com/emacs.html Music CD Trading => http://www.northbound-train.com/cdr.html ------------------------------------------------------------------------------ Live Free, that's the message! ------------------------------------------------------------------------------