From 073be2454c21f4645c0cc8d6244a3fd38c1c6fa3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 15 Nov 2001 11:53:36 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 6 ++++++ lisp/gnus-art.el | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d0d3c5b..631217d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2001-11-15 Per Abrahamsen + + * gnus-art.el (gnus-article-wash-status-strings): New constant. + (gnus-gnus-article-wash-status-entry): New function. + (gnus-article-wash-status): Use it. + 2001-11-13 10:00:00 ShengHuo ZHU * mml1991.el: Add coding header. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index f2d9b74..7f3861d 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4479,6 +4479,41 @@ If no internal viewer is available, use an external viewer." (when ibegend (goto-char point)))) +(defconst gnus-article-wash-status-strings + (let ((alist '((cite "c" "Possible hidden citation text" + " " "All citation text visible") + (headers "h" "Hidden headers" + " " "All headers visible.") + (pgp "p" "Encrypted or signed message status hidden" + " " "No hidden encryption nor digital signature status") + (signature "s" "Signature has been hidden" + " " "Signature is visible") + (overstrike "o" "Overstrike (^H) characters applied" + " " "No overstrike characters applied") + (gnus-show-mime "m" "Mime processing is activated" + " " "Mime processing is not activated") + (emphasis "e" "/*_Emphasis_*/ characters applied" + " " "No /*_emphasis_*/ characters applied"))) + result) + (dolist (entry alist result) + (let ((key (nth 0 entry)) + (on (copy-seq (nth 1 entry))) + (on-help (nth 2 entry)) + (off (copy-seq (nth 3 entry))) + (off-help (nth 4 entry))) + (put-text-property 0 1 'help-echo on-help on) + (put-text-property 0 1 'help-echo off-help off) + (push (list key on off) result)))) + "Alist of strings describing wash status in the mode line. +Each entry has the form (KEY ON OF), where the KEY is a symbol +representing the particular washing function, ON is the string to use +in the article mode line when the washing function is active, and OFF +is the string to use when it is inactive.") + +(defun gnus-gnus-article-wash-status-entry (key value) + (let ((entry (assoc key gnus-article-wash-status-strings))) + (if value (nth 1 entry) (nth 2 entry)))) + (defun gnus-article-wash-status () "Return a string which display status of article washing." (save-excursion @@ -4493,14 +4528,16 @@ If no internal viewer is available, use an external viewer." (signature (memq 'signature gnus-article-wash-types)) (overstrike (memq 'overstrike gnus-article-wash-types)) (emphasis (memq 'emphasis gnus-article-wash-types))) - (format "%c%c%c%c%c%c%c" - (if cite ?c ? ) - (if (or headers boring) ?h ? ) - (if (or pgp pem signed encrypted) ?p ? ) - (if signature ?s ? ) - (if overstrike ?o ? ) - (if gnus-show-mime ?m ? ) - (if emphasis ?e ? ))))) + (concat (gnus-gnus-article-wash-status-entry 'cite cite) + (gnus-gnus-article-wash-status-entry 'headers + (or headers boring)) + (gnus-gnus-article-wash-status-entry + 'pgp (or pgp pem signed encrypted)) + (gnus-gnus-article-wash-status-entry 'signature signature) + (gnus-gnus-article-wash-status-entry 'overstrike overstrike) + (gnus-gnus-article-wash-status-entry 'gnus-show-mime + gnus-show-mime) + (gnus-gnus-article-wash-status-entry 'emphasis emphasis))))) (defalias 'gnus-article-hide-headers-if-wanted 'gnus-article-maybe-hide-headers) -- 1.7.10.4