From 623127597f63c23ce351f7466e09a8f270579c60 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 3 May 2021 17:31:03 -0400 Subject: [PATCH] Disable minibuffer error silencer hack in Emacs 27+ In older versions of Emacs (26.3 and below), the minibuffer would replace the whole minibuffer's contents just to display error messages. This was very frustrating for mundane errors, like the "text is read-only" error you get when you press backspace at BOL. Later versions of Emacs now display errors at the end of the minibuffer, so this hack will no longer be needed when we drop 26.x support later this year. --- core/core-ui.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 9e4b742c0..b5130d5b6 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -738,15 +738,17 @@ disable it to fix all that visual noise." (add-function :around whitespace-enable-predicate #'doom-disable-whitespace-mode-in-childframes-a)) ;; Don't display messages in the minibuffer when using the minibuffer -(defmacro doom-silence-motion-key (command key) - (let ((key-command (intern (format "doom/silent-%s" command)))) - `(progn - (defun ,key-command () - (interactive) - (ignore-errors (call-interactively ',command))) - (define-key minibuffer-local-map (kbd ,key) #',key-command)))) -(doom-silence-motion-key backward-delete-char "") -(doom-silence-motion-key delete-char "") +;; DEPRECATED Remove when Emacs 26.x support is dropped. +(eval-when! (not EMACS27+) + (defmacro doom-silence-motion-key (command key) + (let ((key-command (intern (format "doom/silent-%s" command)))) + `(progn + (defun ,key-command () + (interactive) + (ignore-errors (call-interactively ',command))) + (define-key minibuffer-local-map (kbd ,key) #',key-command)))) + (doom-silence-motion-key backward-delete-char "") + (doom-silence-motion-key delete-char "")) (provide 'core-ui) ;;; core-ui.el ends here