changeset 88172:7bba2fede2be

(rmail-summary-font-lock-keywords): Fix typo for labels. (rmail-summary-get-summary): Add labels again.
author Alex Schroeder <alex@gnu.org>
date Mon, 16 Jan 2006 23:09:30 +0000
parents 4824ab00dc3e
children 8a27a461f50a
files lisp/mail/rmailsum.el
diffstat 1 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Mon Jan 16 22:22:44 2006 +0000
+++ b/lisp/mail/rmailsum.el	Mon Jan 16 23:09:30 2006 +0000
@@ -62,7 +62,7 @@
     ("^....-.*" . font-lock-type-face)				; Unread.
     ;; Neither of the below will be highlighted if either of the above are:
     ("^.....[^D-]....\\(......\\)" 1 font-lock-keyword-face)	; Date.
-    ("{ \\([^\n}]+\\),}" 1 font-lock-comment-face))		; Labels.
+    ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face))		; Labels.
   "Additional expressions to highlight in Rmail Summary mode.")
 
 (defvar rmail-summary-redo nil
@@ -1670,15 +1670,19 @@
 
 (defun rmail-summary-get-summary (n)
   "Return a summary line for message N."
-  (funcall rmail-summary-line-decoder
-	   (format "%5s%s%6s %25s%s %s\n"
-		   n
-		   (rmail-summary-get-summary-attributes n)
-		   (concat (rmail-desc-get-day-number n) "-"
-			   (rmail-desc-get-month n))
-		   (rmail-desc-get-sender n)
-		   (rmail-summary-get-line-count n)
-		   (rmail-desc-get-subject n))))
+  (let* ((keywords (rmail-desc-get-keywords n))
+	 (str (if keywords 
+		  (concat "{ " (mapconcat 'identity keywords " ") " } ")
+		"")))
+    (funcall rmail-summary-line-decoder
+	     (format "%5s%s%6s %25s%s %s\n"
+		     n
+		     (rmail-summary-get-summary-attributes n)
+		     (concat (rmail-desc-get-day-number n) "-"
+			     (rmail-desc-get-month n))
+		     (rmail-desc-get-sender n)
+		     (rmail-summary-get-line-count n)
+		     (concat str (rmail-desc-get-subject n))))))
 
 (defun rmail-summary-update-attribute (attr-index n)
   "Update the attribute denoted by ATTR-INDEX in message N."