changeset 101950:01bb1ca54bd5

(rmail-get-summary-labels): Store any message labels for use in completion.
author Glenn Morris <rgm@gnu.org>
date Thu, 12 Feb 2009 03:28:37 +0000
parents 3d4ab04238a6
children 22a84dde5ca4
files lisp/mail/rmailsum.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Thu Feb 12 03:27:01 2009 +0000
+++ b/lisp/mail/rmailsum.el	Thu Feb 12 03:28:37 2009 +0000
@@ -421,6 +421,8 @@
       (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 @@
   (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.