Gnus development mailing list
 help / color / mirror / Atom feed
* Font-lock for Server mode
@ 2001-08-17 21:27 Joe Casadonte
  2001-08-19 10:47 ` Simon Josefsson
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Casadonte @ 2001-08-17 21:27 UTC (permalink / raw)


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!
------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Font-lock for Server mode
  2001-08-17 21:27 Font-lock for Server mode Joe Casadonte
@ 2001-08-19 10:47 ` Simon Josefsson
  2001-08-19 15:50   ` Mind The Paperwork (was: Font-lock for Server mode) Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Josefsson @ 2001-08-19 10:47 UTC (permalink / raw)
  Cc: ding-list

"Joe Casadonte" <jcasadonte@northbound-train.com> writes:

> 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.

Added, thanks.  I'm not sure the colors are the best though, opinions?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Mind The Paperwork (was: Font-lock for Server mode)
  2001-08-19 10:47 ` Simon Josefsson
@ 2001-08-19 15:50   ` Lars Magne Ingebrigtsen
  2001-08-19 17:18     ` Simon Josefsson
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-19 15:50 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Added, thanks. 

That was a pretty big code contribution.  Did you check that Joe
Casadonte has assigned copyright for the code to the FSF?

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Mind The Paperwork (was: Font-lock for Server mode)
  2001-08-19 15:50   ` Mind The Paperwork (was: Font-lock for Server mode) Lars Magne Ingebrigtsen
@ 2001-08-19 17:18     ` Simon Josefsson
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Josefsson @ 2001-08-19 17:18 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

>> Added, thanks. 
>
> That was a pretty big code contribution.  Did you check that Joe
> Casadonte has assigned copyright for the code to the FSF?

No.  Oops.  Joe?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-19 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-17 21:27 Font-lock for Server mode Joe Casadonte
2001-08-19 10:47 ` Simon Josefsson
2001-08-19 15:50   ` Mind The Paperwork (was: Font-lock for Server mode) Lars Magne Ingebrigtsen
2001-08-19 17:18     ` Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).