diff --git a/lisp/subr.el b/lisp/subr.el index eaec223585..68e25c96d9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2828,7 +2828,8 @@ y-or-n-p (concat prompt (if (or (zerop l) (eq ?\s (aref prompt (1- l)))) "" " ") - (if dialog "" "(y or n) ")))))) + (if dialog "" "(y or n) "))))) + (old-this-command this-command)) (cond (noninteractive (setq prompt (funcall padded prompt)) @@ -2858,6 +2859,7 @@ y-or-n-p (let ((ret (eq answer 'act))) (unless noninteractive (message "%s%c" prompt (if ret ?y ?n))) + (setq this-command old-this-command) ret)))