Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
13fe29bd
Commit
13fe29bd
authored
Dec 27, 2005
by
Bill Wohler
Browse files
(mh-prompt-for-folder): Use can-create argument to suppress creation
of folder if it doesn't exist.
parent
ee79234b
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
187 additions
and
159 deletions
+187
-159
lisp/mh-e/ChangeLog
lisp/mh-e/ChangeLog
+185
-157
lisp/mh-e/mh-utils.el
lisp/mh-e/mh-utils.el
+2
-2
No files found.
lisp/mh-e/ChangeLog
View file @
13fe29bd
This diff is collapsed.
Click to expand it.
lisp/mh-e/mh-utils.el
View file @
13fe29bd
...
...
@@ -2382,7 +2382,6 @@ optional argument DEFAULT-STRING is non-nil, use it in the prompt
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 @@ used in searching."
(
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 @@ used in searching."
(
mh-speed-add-folder
folder-name
))
(
message
"Creating %s...done"
folder-name
))
(
new-file-flag
(
error
"Folder %s
i
s not
created
"
folder-name
))
(
error
"Folder %s
doe
s 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
)))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment