From: yamaoka Date: Mon, 19 Mar 2001 03:41:28 +0000 (+0000) Subject: * gnus-kill.el (gnus-execute): Work with the extra headers. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2b2b04944eb265584ba70f80c3b7531c1b88773e;p=elisp%2Fgnus.git- * gnus-kill.el (gnus-execute): Work with the extra headers. * gnus-sum.el (gnus-summary-execute-command): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 941a7c9..fc0f5e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-03-19 Katsumi Yamaoka + + * 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 * lisp/message.el (message-fix-before-sending): Hide again the diff --git a/lisp/gnus-kill.el b/lisp/gnus-kill.el index dfed289..4372825 100644 --- a/lisp/gnus-kill.el +++ b/lisp/gnus-kill.el @@ -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) - 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. - ((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))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index f8ef105..158221d 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -7329,9 +7329,11 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead." (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: ")