diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 2e8872341f..4376f9835e 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -302,6 +302,7 @@ minibuffer-prompt-properties--setter ;; fns.c (use-dialog-box menu boolean "21.1") (use-file-dialog menu boolean "22.1") + (use-short-answers menu boolean "28.1") (focus-follows-mouse frames (choice (const :tag "Off (nil)" :value nil) diff --git a/src/fns.c b/src/fns.c index 2de1d26dd3..128bd7af55 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2873,6 +2873,11 @@ DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0, return obj; } + if (use_short_answers) + { + return call1 (intern ("y-or-n-p"), prompt); + } + AUTO_STRING (yes_or_no, "(yes or no) "); prompt = CALLN (Fconcat, prompt, yes_or_no); @@ -5791,6 +5796,10 @@ syms_of_fns (void) this variable. */); use_file_dialog = true; + DEFVAR_BOOL ("use-short-answers", use_short_answers, + doc: /* Non-nil means `yes-or-no-p' uses shorter answers "y" or "n". */); + use_short_answers = false; + defsubr (&Sidentity); defsubr (&Srandom); defsubr (&Slength);