From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8239 Path: main.gmane.org!not-for-mail From: Juliusz Chroboczek Newsgroups: gmane.emacs.gnus.general Subject: How *not* to highlight Date: 08 Oct 1996 20:51:47 +0100 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.89) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035148433 10926 80.91.224.250 (20 Oct 2002 21:13:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:13:53 +0000 (UTC) Return-Path: Original-Received: (qmail 529 invoked from smtpd); 8 Oct 1996 20:12:27 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 8 Oct 1996 20:12:27 -0000 Original-Received: from rainich.dcs.ed.ac.uk (xtpp@rainich.dcs.ed.ac.uk [129.215.160.105]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Tue, 8 Oct 1996 21:51:56 +0200 Original-Received: from calvay.dcs.ed.ac.uk by rainich.dcs.ed.ac.uk with SMTP (PP); Tue, 8 Oct 1996 20:51:51 +0100 Original-To: ding@ifi.uio.no Original-Lines: 38 X-Mailer: Gnus v5.3/Emacs 19.34 Xref: main.gmane.org gmane.emacs.gnus.general:8239 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:8239 Hello, I was thinking how to keep Gnus from highlighting when some face stuff has already been done, e.g. by a MIME decoder. The problem is that if the preprocessor changed some faces, then the Gnus highlighting functions will just undo its work. What I currently do is to check in the function gnus-article-maybe-highlight whether (text-property-not-all (point-min) (point-max) 'face nil) in the article buffer. If it is the case, no highlighting is done. Of course, this is not the right approach. This means that if a face has been changed, say, in the body of the article, then neither the headers nor the signature will be highlighted. Furthermore, it does not inhibit spurious highlighting in the summary buffer. I've thought about doing a similar check in the function `gnus-add-text-properties', but then any function that sets text faces would have to make sure that those will not be overridden later. Or should I add a function `gnus-set-text-face', which would be called by all the highlighting functions? By the way, I believe that this modification should find its way into the distribution of Gnus. It does not cost much, and as highlighting is only there for esthetics, a preprocessor should be able to override it. Just if you're interested: I need this for some character set support that I've added to TM and RMIME. Feel free to browse http://www.dcs.ed.ac.uk/home/jec/charset/ J. Chroboczek