From 76e6dcd550f44f2a9a5eeae3a52f5f42a88edb82 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 23 May 2022 02:31:29 +0200 Subject: [PATCH] refactor: replace yes-or-no-p advice w/ use-short-answers This option was introduced in 28.1. --- core/core-ui.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index 09a64f8e5..586e9df4e 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -307,7 +307,10 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq resize-mini-windows 'grow-only) ;; Typing yes/no is obnoxious when y/n will do -(advice-add #'yes-or-no-p :override #'y-or-n-p) +(if EMACS28+ + (setq use-short-answers t) + ;; DEPRECATED Remove when we drop 27.x support + (advice-add #'yes-or-no-p :override #'y-or-n-p)) ;; Try to keep the cursor out of the read-only portions of the minibuffer. (setq minibuffer-prompt-properties '(read-only t intangible t cursor-intangible t face minibuffer-prompt))