Mercurial > emacs
changeset 102139:171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
(rmail-speedbar-find-file): Use rmail rather than find-file.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 20 Feb 2009 04:35:00 +0000 |
parents | 3830c0dc1415 |
children | 3dbb3b69b373 |
files | lisp/ChangeLog lisp/mail/rmail.el |
diffstat | 2 files changed, 18 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Feb 20 04:31:13 2009 +0000 +++ b/lisp/ChangeLog Fri Feb 20 04:35:00 2009 +0000 @@ -1,3 +1,8 @@ +2009-02-20 Glenn Morris <rgm@gnu.org> + + * mail/rmail.el (rmail-speedbar-buttons): Only add regular files. + (rmail-speedbar-find-file): Use rmail rather than find-file. + 2009-02-20 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> * textmodes/bibtex.el (bibtex-autokey-titleword-ignore): Fix
--- a/lisp/mail/rmail.el Fri Feb 20 04:31:13 2009 +0000 +++ b/lisp/mail/rmail.el Fri Feb 20 04:35:00 2009 +0000 @@ -3816,6 +3816,7 @@ (define-key rmail-speedbar-key-map "M" 'rmail-speedbar-move-message-to-folder-on-line))) +;; FIXME unused? (defvar rmail-speedbar-menu-items '(["Read Folder" speedbar-edit-line t] ["Move message to folder" rmail-speedbar-move-message-to-folder-on-line @@ -3857,12 +3858,12 @@ (df (directory-files (with-current-buffer buffer default-directory) nil rmail-speedbar-match-folder-regexp))) - (while df - (speedbar-insert-button "<M>" 'speedbar-button-face 'highlight - 'rmail-speedbar-move-message (car df)) - (speedbar-insert-button (car df) 'speedbar-file-face 'highlight - 'rmail-speedbar-find-file nil t) - (setq df (cdr df))))))) + (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))))))) (defun rmail-speedbar-button (text token indent) "Execute an rmail command specified by TEXT. @@ -3875,7 +3876,7 @@ TOKEN and INDENT are not used." (speedbar-with-attached-buffer (message "Loading in RMAIL file %s..." text) - (find-file text))) + (rmail text))) (defun rmail-speedbar-move-message-to-folder-on-line () "If the current line is a folder, move current message to it." @@ -3887,6 +3888,7 @@ (forward-char -2) (speedbar-do-function-pointer))))) +;; FIXME loses the directory part. (defun rmail-speedbar-move-message (text token indent) "From button TEXT, copy current message to the rmail file specified by TOKEN. TEXT and INDENT are not used." @@ -3894,10 +3896,10 @@ (message "Moving message to %s" token) (rmail-output token))) -; Functions for setting, getting and encoding the POP password. -; The password is encoded to prevent it from being easily accessible -; to "prying eyes." Obviously, this encoding isn't "real security," -; nor is it meant to be. +;; Functions for setting, getting and encoding the POP password. +;; The password is encoded to prevent it from being easily accessible +;; to "prying eyes." Obviously, this encoding isn't "real security," +;; nor is it meant to be. ;;;###autoload (defun rmail-set-remote-password (password)