Function: rmail-get-labels

rmail-get-labels is a byte-compiled function defined in rmail.el.gz.

Signature

(rmail-get-labels &optional MSG)

Documentation

Return a string with the labels (attributes and keywords) of msg MSG.

It is put in comma-separated form. MSG, if non-nil, identifies the message number to use. If nil, that means the current message.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
(defun rmail-get-labels (&optional msg)
  "Return a string with the labels (attributes and keywords) of msg MSG.
It is put in comma-separated form.
MSG, if non-nil, identifies the message number to use.
If nil, that means the current message."
  (or msg (setq msg rmail-current-message))
  (let (attr-names keywords)
    ;; Combine the message attributes and keywords
    ;; into a comma-separated list.
    (setq attr-names (rmail-get-attr-names msg)
	  keywords (rmail-get-keywords msg))
    (if (string= keywords "")
	(setq keywords nil))
    (cond
     ;; FIXME ? old rmail did not have spaces in the comma-separated lists.
     ((and attr-names keywords) (concat " " attr-names "; " keywords))
     (attr-names (concat " " attr-names))
     (keywords (concat " " keywords))
     (t ""))))