Fix the previous mml patch better
* lisp/gnus/mml.el (mml-minibuffer-read-file): Fix the previous patch in a better way (bug#20480).
This commit is contained in:
parent
9fc67ae2dd
commit
d47dadd168
1 changed files with 2 additions and 3 deletions
|
@ -1249,13 +1249,12 @@ If not set, `default-directory' will be used."
|
|||
|
||||
(defun mml-minibuffer-read-file (prompt)
|
||||
(let* ((completion-ignored-extensions nil)
|
||||
(buffer-file-name nil)
|
||||
(file (read-file-name prompt
|
||||
(or mml-default-directory default-directory)
|
||||
"" t)))
|
||||
nil t)))
|
||||
;; Prevent some common errors. This is inspired by similar code in
|
||||
;; VM.
|
||||
(when (zerop (length file))
|
||||
(error "No file name entered"))
|
||||
(when (file-directory-p file)
|
||||
(error "%s is a directory, cannot attach" file))
|
||||
(unless (file-exists-p file)
|
||||
|
|
Loading…
Add table
Reference in a new issue