Commit 208dee4d authored by Glenn Morris's avatar Glenn Morris
Browse files

* lisp/subr.el (y-or-n-p): Handle empty prompts.

Fixes: debbugs:14770
parent a944db14
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment