refactor: replace yes-or-no-p advice w/ use-short-answers

This option was introduced in 28.1.
This commit is contained in:
Henrik Lissner 2022-05-23 02:31:29 +02:00
parent 866e1b32bf
commit 76e6dcd550
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -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))