From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9052 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Quote emphasis Date: 01 Dec 1996 01:16:40 +0100 Organization: The Church of Emacs Sender: abraham@dina.kvl.dk Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035149136 16185 80.91.224.250 (20 Oct 2002 21:25:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:25:36 +0000 (UTC) Return-Path: Original-Received: (qmail 21386 invoked from smtpd); 1 Dec 1996 00:37:04 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 1 Dec 1996 00:36:57 -0000 Original-Received: from elc1.dina.kvl.dk (elc1.dina.kvl.dk [130.225.40.228]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 1 Dec 1996 01:24:55 +0100 Original-Received: from babbage.dina.kvl.dk (babbage.dina.kvl.dk [130.225.40.217]) by elc1.dina.kvl.dk (8.6.12/8.6.4) with ESMTP id BAA13957; Sun, 1 Dec 1996 01:17:15 +0100 Original-Received: (abraham@localhost) by babbage.dina.kvl.dk (8.6.12/8.6.4) id BAA24883; Sun, 1 Dec 1996 01:16:40 +0100 Original-To: ding@ifi.uio.no X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ In-Reply-To: Sudish Joseph's message of 30 Nov 1996 18:14:38 -0500 Original-Lines: 86 Xref: main.gmane.org gmane.emacs.gnus.general:9052 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:9052 Sudish Joseph writes: > In article , > Steven L Baur writes: > > I played around a bit with it, and while it does add more color, it > > has the potential for confusing things more in messages which contain > > code. > > I liked it, but I agree that it can cause havoc for certain messages. Which? It works fine with the code snips I have seen. The strings gets highlighted, as if the code was font-locked. > > It would work best IMO if it were controlled by YAV, and possibly > > restricted to only original text. (It clashes at times with the > > citation highlight :-( ). I have emphasize before highlight-citation in `gnus-article-display-hook' (that is the way they are listed in the customization buffer), so I don't see this. But I agree it should be on a separate hook function. What should it be called? `highlight-quotes' would be "correct", but may be easy to confuse with `highlight-citation'. > I think the general solution to article buffer massagers that get in > the way for special articles is to provide unmassagers, functions that > reverse the effects of the massagers. This would be useful for > smiley.el as well. > > If all massagers provided two hook-safe functions, feature-foo-article > and un-feature-foo-article, we wouldn't need variables. They could be > added to the appropriate hook and given bindings in the W keymap. Too difficult, not all display features can be undone. Here is an alternative: Replace the call to `gnus-article-display-hook' with (make-local-variable 'gnus-local-article-display-hook) (setq gnus-local-article-display-hook (copy-list gnus-article-display-hook)) (run-hooks 'gnus-local-article-display-hook) Bind each wash function along these lines: (defun gnus-wash-toggle-add-buttons () "Toggle buttons in the current article." (interactive) (gnus-wash-toggle 'gnus-article-add-buttons)) (defun gnus-wash-toggle (fun) "Toggle argument FUN in and redisplay the article." (if (memq fun gnus-local-article-display-hook) (remove-hook 'gnus-local-article-display-hook fun) (add-hook 'gnus-local-article-display-hook fun) ;; The next line is even more pseudo code than the rest... (copy-buffer " *Original Article*" "*Article*") (run-hooks 'gnus-local-article-display-hook))) Some benefits would be: The menu entries for the wash toggle functions would be checkboxes, and they look *so* cool under XEmacs. You could have the commands (defun gnus-wash-apply () "Use the current state to the wash toggles for future articles. The effect expires when you exit emacs." (interactive) (setq gnus-article-display-hook (copy-list gnus-local-article-display-hook))) (defun gnus-wash-set-defeault () "Use the current state to the wash toggles for future articles. The effect expires when you exit emacs." (interactive) (gnus-wash-apply) (put 'gnus-article-display-hook 'saved-value (list gnus-article-display-hook)) (custom-save)) with menu entries to make it really easy to customize the washing.