From: Glenn Morris Date: Thu, 12 Feb 2009 03:28:37 +0000 (+0000) Subject: (rmail-get-summary-labels): Store any message labels for use in X-Git-Tag: emacs-pretest-23.0.91~285 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5c9b1aaadff6035bcf0a28d70becc3b8d00caec8;p=emacs.git (rmail-get-summary-labels): Store any message labels for use in completion. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 82dc56ae64f..08f1fc4d89d 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -421,6 +421,8 @@ the message being processed." (setq result (concat "{" result "}"))) result)) +(autoload 'rmail-make-label "rmailkwd") + (defun rmail-get-summary-labels () "Return a string wrapped in curly braces with the current message labels. Returns nil if there are no labels. The current buffer must @@ -429,7 +431,10 @@ processed." (let ((labels (mail-fetch-field rmail-keyword-header))) (and labels (not (string-equal labels "")) - (format "{ %s } " labels)))) + (progn + ;; Intern so that rmail-read-label can offer completion. + (mapc 'rmail-make-label (split-string labels ", ")) + (format "{ %s } " labels))))) (defun rmail-create-summary (msgnum deleted unseen lines) "Return the summary line for message MSGNUM.