diff --git a/lisp/subr.el b/lisp/subr.el index ef2edcff102..ca4d52535a0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3306,9 +3306,7 @@ while calling this function, then pressing `help-char' causes it to evaluate `help-form' and display the result. There is no need to explicitly add `help-char' to CHARS; `help-char' is bound automatically to `help-form-show'." - (defvar empty-history) - (let* ((empty-history '()) - (map (if (consp chars) + (let* ((map (if (consp chars) (or (gethash (list help-form (cons help-char chars)) read-char-from-minibuffer-map-hash) (let ((map (make-sparse-keymap)) @@ -3335,9 +3333,7 @@ There is no need to explicitly add `help-char' to CHARS; read-char-from-minibuffer-map)) ;; Protect this-command when called from pre-command-hook (bug#45029) (this-command this-command) - (result - (read-from-minibuffer prompt nil map nil - (or history 'empty-history))) + (result (read-from-minibuffer prompt nil map nil (or history t))) (char (if (> (length result) 0) ;; We have a string (with one character), so return the first one. @@ -3538,9 +3534,7 @@ like) while `y-or-n-p' is running)." (discard-input))) (t (setq prompt (funcall padded prompt)) - (defvar empty-history) - (let* ((empty-history '()) - (enable-recursive-minibuffers t) + (let* ((enable-recursive-minibuffers t) (msg help-form) (keymap (let ((map (make-composed-keymap y-or-n-p-map query-replace-map))) @@ -3557,7 +3551,7 @@ like) while `y-or-n-p' is running)." (this-command this-command) (str (read-from-minibuffer prompt nil keymap nil - (or y-or-n-p-history-variable 'empty-history)))) + (or y-or-n-p-history-variable t)))) (setq answer (if (member str '("y" "Y")) 'act 'skip))))) (let ((ret (eq answer 'act))) (unless noninteractive