changeset 37178:3dab3c3ae5ee

(mh-folder-hist): New var. (mh-prompt-for-folder): Use it and pass `default' to completing-read.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 03 Apr 2001 16:02:35 +0000
parents bc78319a9116
children ebfe0296345e
files lisp/mail/mh-utils.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mh-utils.el	Tue Apr 03 15:41:47 2001 +0000
+++ b/lisp/mail/mh-utils.el	Tue Apr 03 16:02:35 2001 +0000
@@ -725,6 +725,7 @@
   (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 @@
 	 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 "+"))