summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-04-03 16:02:45 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-04-03 16:02:45 +0000
commit9832760a3e77f2de803cf605129af8929677af38 (patch)
tree1514d5c27d076ec0ea94e54310604898b532d425
parent4c1dadb1d58c92222405096c327fbf29c0b3dcf9 (diff)
downloademacs-9832760a3e77f2de803cf605129af8929677af38.tar.gz
(mh-folder-hist): New var.
(mh-prompt-for-folder): Use it and pass `default' to completing-read.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/mh-utils.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 87c86d142ef..dfacf7c2f72 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-03 Stefan Monnier <monnier@cs.yale.edu>
+
+ * mail/mh-utils.el (mh-folder-hist): New var.
+ (mh-prompt-for-folder): Use it and pass `default' to completing-read.
+
2001-04-03 Eli Zaretskii <eliz@is.elta.co.il>
* hexl.el (hexl-scroll-up): If scrolling gets outside the hexl
diff --git a/lisp/mail/mh-utils.el b/lisp/mail/mh-utils.el
index 30605bb9311..c71e51656df 100644
--- a/lisp/mail/mh-utils.el
+++ b/lisp/mail/mh-utils.el
@@ -725,6 +725,7 @@ directory names."
(setq mode-name mode-name-string)
(force-mode-line-update t))
+(defvar mh-folder-hist nil)
(defun mh-prompt-for-folder (prompt default can-create)
;; Prompt for a folder name with PROMPT. Returns the folder's name as a
@@ -739,8 +740,8 @@ directory names."
read-name folder-name)
(if (null mh-folder-list)
(mh-set-folder-list))
- (while (and (setq read-name (completing-read prompt mh-folder-list
- nil nil "+"))
+ (while (and (setq read-name (completing-read prompt mh-folder-list nil nil
+ "+" 'mh-folder-hist default))
(equal read-name "")
(equal default "")))
(cond ((or (equal read-name "") (equal read-name "+"))