Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Make Gnus highlighting Lisp snippets ?
@ 2004-06-09  7:12 Xavier Maillard
  2004-06-09  8:32 ` Hans-Peter Binder
  0 siblings, 1 reply; 3+ messages in thread
From: Xavier Maillard @ 2004-06-09  7:12 UTC (permalink / raw)


Yo,

Is there a possibility (I am pretty sure there is one) to make
Gnus (No Gnus) highlighting code snippets for certain groups ?

In fact I am reading a lot of Lisp related usenet groups and
pretty often Lisp source are posted. My problem is I don't
really see how I can tell Gnus to detect Lisp code in messages.

So the idea would be to restrain this code detection on a set of
known Lisp groups and have a pattern to detect Lisp mixed with
text.

Any idea on how to do this ?

Thank you
-- 
No e-patents, pas de brevets logiciels
Pétition contre les brevets logiciels : http://petition.eurolinux.org


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

* Re: Make Gnus highlighting Lisp snippets ?
  2004-06-09  7:12 Make Gnus highlighting Lisp snippets ? Xavier Maillard
@ 2004-06-09  8:32 ` Hans-Peter Binder
       [not found]   ` <plop87oens4hxm.fsf@gnu-rox.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Hans-Peter Binder @ 2004-06-09  8:32 UTC (permalink / raw)


* Xavier Maillard <zedek@gnu-rox.org> writes:
> Yo,
>
> Is there a possibility (I am pretty sure there is one) to make
> Gnus (No Gnus) highlighting code snippets for certain groups ?
>
> In fact I am reading a lot of Lisp related usenet groups and
> pretty often Lisp source are posted. My problem is I don't
> really see how I can tell Gnus to detect Lisp code in messages.
>
> So the idea would be to restrain this code detection on a set of
> known Lisp groups and have a pattern to detect Lisp mixed with
> text.
>
> Any idea on how to do this ?

Maybe this one can help you.

;; fontlocking Lisp in News,
;; i.e. all groups with 'gnu' and 'emacs'

    (defvar egoge-emacs-lisp-ngs-regexp
      (regexp-opt
       '(
	 "gnu" "emacs"
	 )))

    (add-to-list 'mm-uu-type-alist
		 '(emacs-lisp "^(" ")\\s-*\\(\n\n\\|\n?\\'\\)"
			      mm-uu-emacs-sources-extract nil
			      egoge-mm-uu-emacs-lisp-test))

    (defun egoge-mm-uu-emacs-lisp-test ()
      (and gnus-newsgroup-name
	   (string-match egoge-emacs-lisp-ngs-regexp
			 gnus-newsgroup-name)))

    (mm-uu-configure)


Regards/Gruesse
Hans-Peter Binder
-- 
(coffee-mode -1)


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

* Re: Make Gnus highlighting Lisp snippets ?
       [not found]         ` <m24qpjyioa.fsf@appledomain.de>
@ 2004-06-10 16:58           ` Steinar Børmer
  0 siblings, 0 replies; 3+ messages in thread
From: Steinar Børmer @ 2004-06-10 16:58 UTC (permalink / raw)


Hans-Peter Binder wrote:

| * Steinar Børmer <s1726@ii.uib.no> writes:
|
| > I can't find these.  Not even the group gnus.test.  Which server
| > do you use?
| 
| news.gnus.org ;-)

Ah, thanks.

Now, with a

(require 'mm-uu)

the code you posted works for me as well.

-- 
SB

I am so smart, so smart - s-m-r-t!  I mean, s-m-A-r-t!
	         			- Homer Simpson


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

end of thread, other threads:[~2004-06-10 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09  7:12 Make Gnus highlighting Lisp snippets ? Xavier Maillard
2004-06-09  8:32 ` Hans-Peter Binder
     [not found]   ` <plop87oens4hxm.fsf@gnu-rox.org>
     [not found]     ` <m2n03cl2s9.fsf@appledomain.de>
     [not found]       ` <ut5zn7cc57y.fsf@havengel.ii.uib.no>
     [not found]         ` <m24qpjyioa.fsf@appledomain.de>
2004-06-10 16:58           ` Steinar Børmer

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