From 3f112c2378d3d6e3ae9fa92a7dfc9fa024c2f5d7 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 19 Mar 2001 03:41:36 +0000 Subject: [PATCH] * gnus-kill.el (gnus-execute): Work with the extra headers. * gnus-sum.el (gnus-summary-execute-command): Ditto. --- ChangeLog | 5 +++++ lisp/gnus-kill.el | 24 ++++++++++++++++++------ lisp/gnus-sum.el | 8 +++++--- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3afd035..ced0009 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 368eb49..b4100d5 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -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: " - (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: ") -- 1.7.10.4