From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/3872 Path: news.gmane.org!not-for-mail From: Hans-Peter Binder Newsgroups: gmane.emacs.gnus.user Subject: Re: Make Gnus highlighting Lisp snippets ? Date: Wed, 09 Jun 2004 10:32:20 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669888 20725 80.91.229.2 (31 Jan 2006 01:11:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:11:28 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:32:53 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-X-Trace: news.uni-berlin.de bdXkcTC+SJHQBY2Dt1J9ywBPETyS5y7LiozxhBp3gEl+5E/SM= X-Orig-Path: appledomain.de!not-for-mail Mail-Copies-To: never X-Face: 5h&Q`QGXrcFPT$yu,GvHy\Mx4*Tk'V2aTKcAs!r.>)3>(1sIvz$|u0&TP@(TAF&oN3-xszJx8cP!p?luw4tIqnee'Cbr+F&0@kaPMQL]}Z"eik2(e[e,G9rv * Xavier Maillard 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)