* gnus-kill.el (gnus-execute): Work with the extra headers.
authoryamaoka <yamaoka>
Mon, 19 Mar 2001 03:41:36 +0000 (03:41 +0000)
committeryamaoka <yamaoka>
Mon, 19 Mar 2001 03:41:36 +0000 (03:41 +0000)
* gnus-sum.el (gnus-summary-execute-command): Ditto.

ChangeLog
lisp/gnus-kill.el
lisp/gnus-sum.el

index 3afd035..ced0009 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-19  Katsumi Yamaoka <yamaoka@jpl.org>
+
+       * lisp/gnus-kill.el (gnus-execute): Work with the extra headers.
+       * lisp/gnus-sum.el (gnus-summary-execute-command): Ditto.
+
 2001-03-13  Katsumi Yamaoka <yamaoka@jpl.org>
 
        * lisp/message.el (message-fix-before-sending): Hide again the
 2001-03-13  Katsumi Yamaoka <yamaoka@jpl.org>
 
        * lisp/message.el (message-fix-before-sending): Hide again the
index dfed289..4372825 100644 (file)
@@ -641,18 +641,30 @@ If optional 2nd argument UNREAD is non-nil, articles which are
 marked as read or ticked are ignored."
   (save-excursion
     (let ((killed-no 0)
 marked as read or ticked are ignored."
   (save-excursion
     (let ((killed-no 0)
-         function article header)
+         function article header extras)
       (cond
        ;; Search body.
        ((or (null field)
            (string-equal field ""))
        (setq function nil))
        ;; Get access function of header field.
       (cond
        ;; Search body.
        ((or (null field)
            (string-equal field ""))
        (setq function nil))
        ;; Get access function of header field.
-       ((fboundp
-        (setq function
-              (intern-soft
-               (concat "mail-header-" (downcase field)))))
-       (setq function `(lambda (h) (,function h))))
+       ((cond ((fboundp
+               (setq function
+                     (intern-soft
+                      (concat "mail-header-" (downcase field)))))
+              (setq function `(lambda (h) (,function h))))
+             ((when (setq extras
+                          (member (downcase field)
+                                  (mapcar (lambda (header)
+                                            (downcase (symbol-name header)))
+                                          gnus-extra-headers)))
+                (setq function
+                      `(lambda (h)
+                         (gnus-extra-header
+                          (quote ,(nth (- (length gnus-extra-headers)
+                                          (length extras))
+                                       gnus-extra-headers))
+                          h)))))))
        ;; Signal error.
        (t
        (error "Unknown header field: \"%s\"" field)))
        ;; Signal error.
        (t
        (error "Unknown header field: \"%s\"" field)))
index 368eb49..b4100d5 100644 (file)
@@ -7570,9 +7570,11 @@ article.  If BACKWARD (the prefix) is non-nil, search backward instead."
    (list (let ((completion-ignore-case t))
           (completing-read
            "Header name: "
    (list (let ((completion-ignore-case t))
           (completing-read
            "Header name: "
-           (mapcar (lambda (string) (list string))
-                   '("Number" "Subject" "From" "Lines" "Date"
-                     "Message-ID" "Xref" "References" "Body"))
+           (mapcar (lambda (header) (list (format "%s" header)))
+                   (append
+                    '("Number" "Subject" "From" "Lines" "Date"
+                      "Message-ID" "Xref" "References" "Body")
+                    gnus-extra-headers))
            nil 'require-match))
         (read-string "Regexp: ")
         (read-key-sequence "Command: ")
            nil 'require-match))
         (read-string "Regexp: ")
         (read-key-sequence "Command: ")