diff options
| author | Richard M. Stallman | 1994-05-04 22:00:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-04 22:00:30 +0000 |
| commit | b1fd1e8d65a305a01db95d88afb95cf1a3501625 (patch) | |
| tree | 5c9f1b33fac3dd6af73911acb1ccddecaa2c6135 | |
| parent | df0e3d03150426e5e4006900922b8c499d939a0d (diff) | |
| download | emacs-b1fd1e8d65a305a01db95d88afb95cf1a3501625.tar.gz emacs-b1fd1e8d65a305a01db95d88afb95cf1a3501625.zip | |
(rmail-input-menu): Don't call expand-file-name.
Do nothing if rmail-secondary-file-menu return nil.
(rmail-secondary-file-menu): If no files match, warn and return nil.
| -rw-r--r-- | lisp/mail/rmail.el | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 4d4460f293c..bc0e4333688 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -678,21 +678,29 @@ Instead, these commands are available: | |||
| 678 | 678 | ||
| 679 | ;; Choose a .xmail file in dir rmail-secondary-file-directory. | 679 | ;; Choose a .xmail file in dir rmail-secondary-file-directory. |
| 680 | (defun rmail-secondary-file-menu (event) | 680 | (defun rmail-secondary-file-menu (event) |
| 681 | (let* ((files (directory-files rmail-secondary-file-directory nil | 681 | (let ((files (directory-files rmail-secondary-file-directory nil |
| 682 | rmail-secondary-file-regexp)) | 682 | rmail-secondary-file-regexp))) |
| 683 | (menu (list "Rmail Files" | 683 | (if files |
| 684 | (cons "Rmail Files" | 684 | (let* ((menu (list "Rmail Files" |
| 685 | (mapcar (function (lambda (f) (cons f f))) | 685 | (cons "Rmail Files" |
| 686 | files)))) | 686 | (mapcar (function (lambda (f) (cons f f))) |
| 687 | (chosen (x-popup-menu event menu))) | 687 | files)))) |
| 688 | (if chosen | 688 | (chosen (x-popup-menu event menu))) |
| 689 | (expand-file-name chosen rmail-secondary-file-directory)))) | 689 | (if chosen |
| 690 | (expand-file-name chosen rmail-secondary-file-directory))) | ||
| 691 | (message "No files matching %s%s found" | ||
| 692 | rmail-secondary-file-directory rmail-secondary-file-regexp) | ||
| 693 | nil))) | ||
| 694 | |||
| 690 | 695 | ||
| 691 | (defun rmail-input-menu (event) | 696 | (defun rmail-input-menu (event) |
| 692 | "Choose a new Rmail file to edit, with a menu." | 697 | "Choose a new Rmail file to edit, with a menu. |
| 698 | The variables `rmail-secondary-file-directory' and | ||
| 699 | `rmail-secondary-file-regexp' control which files are offered in the menu." | ||
| 693 | (interactive "e") | 700 | (interactive "e") |
| 694 | (rmail-input (expand-file-name (rmail-secondary-file-menu event) | 701 | (let ((file-name (rmail-secondary-file-menu event))) |
| 695 | rmail-secondary-file-directory))) | 702 | (if file-name |
| 703 | (rmail-input file-name)))) | ||
| 696 | 704 | ||
| 697 | ;;;; *** Rmail input *** | 705 | ;;;; *** Rmail input *** |
| 698 | 706 | ||