Function: rmail-speedbar-buttons

rmail-speedbar-buttons is a byte-compiled function defined in rmail.el.gz.

Signature

(rmail-speedbar-buttons BUFFER)

Documentation

Create buttons for BUFFER containing rmail messages.

Click on the address under Reply to: to reply to this person. Under Folders: Click a name to read it, or on the <M> to move the current message into that RMAIL folder.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
(defun rmail-speedbar-buttons (buffer)
  "Create buttons for BUFFER containing rmail messages.
Click on the address under Reply to: to reply to this person.
Under Folders: Click a name to read it, or on the <M> to move the
current message into that RMAIL folder."
  (let ((from nil))
    (with-current-buffer buffer
      (goto-char (point-min))
      (if (not (re-search-forward "^Reply-To: " nil t))
	  (if (not (re-search-forward "^From:? " nil t))
	      (setq from t)))
      (if from
	  nil
	(setq from (buffer-substring (point) (line-end-position)))))
    (goto-char (point-min))
    (if (and (looking-at "Reply to:")
	     (equal from rmail-speedbar-last-user))
	nil
      (setq rmail-speedbar-last-user from)
      (erase-buffer)
      (insert "Reply To:\n")
      (if (stringp from)
	  (speedbar-insert-button from 'speedbar-directory-face 'highlight
				  'rmail-speedbar-button 'rmail-reply))
      (insert "Folders:\n")
      (let* ((case-fold-search nil)
	     (df (directory-files (with-current-buffer buffer
                                    default-directory)
				  nil rmail-speedbar-match-folder-regexp)))
	(dolist (file df)
	  (when (file-regular-p file)
	    (speedbar-insert-button "<M>" 'speedbar-button-face 'highlight
				    'rmail-speedbar-move-message file)
	    (speedbar-insert-button file 'speedbar-file-face 'highlight
				    'rmail-speedbar-find-file nil t)))))))