* lisp/subr.el (y-or-n-p): Handle empty prompts.
Fixes: debbugs:14770
This commit is contained in:
parent
a944db142f
commit
208dee4daa
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-07-03 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* subr.el (y-or-n-p): Handle empty prompts. (Bug#14770)
|
||||
|
||||
2013-05-26 Fabián Ezequiel Gallina <fgallina@gnu.org>
|
||||
|
||||
* progmodes/python.el (python-indent-block-enders): Add break,
|
||||
|
|
|
@ -2352,7 +2352,8 @@ is nil and `use-dialog-box' is non-nil."
|
|||
(cond
|
||||
(noninteractive
|
||||
(setq prompt (concat prompt
|
||||
(if (eq ?\s (aref prompt (1- (length prompt))))
|
||||
(if (or (zerop (length prompt))
|
||||
(eq ?\s (aref prompt (1- (length prompt)))))
|
||||
"" " ")
|
||||
"(y or n) "))
|
||||
(let ((temp-prompt prompt))
|
||||
|
@ -2369,7 +2370,8 @@ is nil and `use-dialog-box' is non-nil."
|
|||
(x-popup-dialog t `(,prompt ("Yes" . act) ("No" . skip)))))
|
||||
(t
|
||||
(setq prompt (concat prompt
|
||||
(if (eq ?\s (aref prompt (1- (length prompt))))
|
||||
(if (or (zerop (length prompt))
|
||||
(eq ?\s (aref prompt (1- (length prompt)))))
|
||||
"" " ")
|
||||
"(y or n) "))
|
||||
(while
|
||||
|
|
Loading…
Add table
Reference in a new issue