aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Bernoulli2021-05-30 20:17:49 +0200
committerJonas Bernoulli2021-05-30 20:17:49 +0200
commit1f5e53285282416be34846698fdfafc29dac034d (patch)
treee2c56d306ed603783e2da82a766ce90b72c6a19a
parentaa91a7cd8347dca8978e9897b41063859e606892 (diff)
downloademacs-1f5e53285282416be34846698fdfafc29dac034d.tar.gz
emacs-1f5e53285282416be34846698fdfafc29dac034d.zip
Avoid code-duplication in which-key--hide-popup
-rw-r--r--which-key.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/which-key.el b/which-key.el
index 3514226f936..b576a5b3786 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1143,17 +1143,14 @@ total height."
1143 (when (and which-key-idle-secondary-delay which-key--secondary-timer-active) 1143 (when (and which-key-idle-secondary-delay which-key--secondary-timer-active)
1144 (which-key--start-timer)) 1144 (which-key--start-timer))
1145 (which-key--lighter-restore) 1145 (which-key--lighter-restore)
1146 (cl-case which-key-popup-type 1146 (which-key--hide-popup-ignore-command)))
1147 ;; Not necessary to hide minibuffer
1148 ;; (minibuffer (which-key--hide-buffer-minibuffer))
1149 (side-window (which-key--hide-buffer-side-window))
1150 (frame (which-key--hide-buffer-frame))
1151 (custom (funcall which-key-custom-hide-popup-function)))))
1152 1147
1153(defun which-key--hide-popup-ignore-command () 1148(defun which-key--hide-popup-ignore-command ()
1154 "Version of `which-key--hide-popup' without the check of 1149 "Version of `which-key--hide-popup' without the check of
1155`real-this-command'." 1150`real-this-command'."
1156 (cl-case which-key-popup-type 1151 (cl-case which-key-popup-type
1152 ;; Not necessary to hide minibuffer
1153 ;; (minibuffer (which-key--hide-buffer-minibuffer))
1157 (side-window (which-key--hide-buffer-side-window)) 1154 (side-window (which-key--hide-buffer-side-window))
1158 (frame (which-key--hide-buffer-frame)) 1155 (frame (which-key--hide-buffer-frame))
1159 (custom (funcall which-key-custom-hide-popup-function)))) 1156 (custom (funcall which-key-custom-hide-popup-function))))