diff lisp/mh-e/mh-utils.el @ 67857:226904e7d40b

(mh-prompt-for-folder): Use can-create argument to suppress creation of folder if it doesn't exist.
author Bill Wohler <wohler@newt.com>
date Tue, 27 Dec 2005 22:42:58 +0000
parents 5b7ceef33307
children 3ca8b2234237
line wrap: on
line diff
--- a/lisp/mh-e/mh-utils.el	Tue Dec 27 21:34:19 2005 +0000
+++ b/lisp/mh-e/mh-utils.el	Tue Dec 27 22:42:58 2005 +0000
@@ -2382,7 +2382,6 @@
 instead of DEFAULT. If ALLOW-ROOT-FOLDER-FLAG is non-nil then the
 function will accept the folder +, which means all folders when
 used in searching."
-  ;; FIXME: can-create is unused!
   (if (null default)
       (setq default ""))
   (let* ((default-string (cond (default-string (format " (default %s)" default-string))
@@ -2417,6 +2416,7 @@
     (let ((new-file-flag
            (not (file-exists-p (mh-expand-file-name folder-name)))))
       (cond ((and new-file-flag
+                  can-create
                   (y-or-n-p
                    (format "Folder %s does not exist.  Create it? "
                            folder-name)))
@@ -2427,7 +2427,7 @@
                (mh-speed-add-folder folder-name))
              (message "Creating %s...done" folder-name))
             (new-file-flag
-             (error "Folder %s is not created" folder-name))
+             (error "Folder %s does not exist" folder-name))
             ((not (file-directory-p (mh-expand-file-name folder-name)))
              (error "\"%s\" is not a directory"
                     (mh-expand-file-name folder-name)))))