diff options
| author | Jonas Bernoulli | 2021-05-30 20:18:50 +0200 |
|---|---|---|
| committer | Jonas Bernoulli | 2021-05-30 21:10:04 +0200 |
| commit | 016b9bbf869767d0a6a32b2644444dd2d85e9fc1 (patch) | |
| tree | a2e56fe8fa6a0b1970b12344c1b2c28a64a8cac7 | |
| parent | 1f5e53285282416be34846698fdfafc29dac034d (diff) | |
| download | emacs-016b9bbf869767d0a6a32b2644444dd2d85e9fc1.tar.gz emacs-016b9bbf869767d0a6a32b2644444dd2d85e9fc1.zip | |
Cosmetics
| -rw-r--r-- | which-key.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/which-key.el b/which-key.el index b576a5b3786..3f5f8097cd1 100644 --- a/which-key.el +++ b/which-key.el | |||
| @@ -724,8 +724,8 @@ update.") | |||
| 724 | (which-key--pages-num-pages which-key--pages-obj))) | 724 | (which-key--pages-num-pages which-key--pages-obj))) |
| 725 | 725 | ||
| 726 | (defsubst which-key--current-prefix () | 726 | (defsubst which-key--current-prefix () |
| 727 | (when which-key--pages-obj | 727 | (and which-key--pages-obj |
| 728 | (which-key--pages-prefix which-key--pages-obj))) | 728 | (which-key--pages-prefix which-key--pages-obj))) |
| 729 | 729 | ||
| 730 | (defmacro which-key--debug-message (&rest msg) | 730 | (defmacro which-key--debug-message (&rest msg) |
| 731 | `(when which-key--debug-buffer-name | 731 | `(when which-key--debug-buffer-name |
| @@ -1182,7 +1182,8 @@ popup)." | |||
| 1182 | ACT-POPUP-DIM includes the dimensions, (height . width) of the | 1182 | ACT-POPUP-DIM includes the dimensions, (height . width) of the |
| 1183 | buffer text to be displayed in the popup. Return nil if no window | 1183 | buffer text to be displayed in the popup. Return nil if no window |
| 1184 | is shown, or if there is no need to start the closing timer." | 1184 | is shown, or if there is no need to start the closing timer." |
| 1185 | (when (and (> (car act-popup-dim) 0) (> (cdr act-popup-dim) 0)) | 1185 | (when (and (> (car act-popup-dim) 0) |
| 1186 | (> (cdr act-popup-dim) 0)) | ||
| 1186 | (cl-case which-key-popup-type | 1187 | (cl-case which-key-popup-type |
| 1187 | ;; Not called for minibuffer | 1188 | ;; Not called for minibuffer |
| 1188 | ;; (minibuffer (which-key--show-buffer-minibuffer act-popup-dim)) | 1189 | ;; (minibuffer (which-key--show-buffer-minibuffer act-popup-dim)) |
| @@ -2449,9 +2450,9 @@ prefix) if `which-key-use-C-h-commands' is non nil." | |||
| 2449 | (interactive) | 2450 | (interactive) |
| 2450 | (cond ((and (not (which-key--popup-showing-p)) | 2451 | (cond ((and (not (which-key--popup-showing-p)) |
| 2451 | which-key-show-early-on-C-h) | 2452 | which-key-show-early-on-C-h) |
| 2452 | (let* ((current-prefix | 2453 | (let ((current-prefix |
| 2453 | (butlast | 2454 | (butlast |
| 2454 | (listify-key-sequence (which-key--this-command-keys))))) | 2455 | (listify-key-sequence (which-key--this-command-keys))))) |
| 2455 | (which-key-reload-key-sequence current-prefix) | 2456 | (which-key-reload-key-sequence current-prefix) |
| 2456 | (if which-key-idle-secondary-delay | 2457 | (if which-key-idle-secondary-delay |
| 2457 | (which-key--start-timer which-key-idle-secondary-delay t) | 2458 | (which-key--start-timer which-key-idle-secondary-delay t) |
| @@ -2773,10 +2774,8 @@ Finally, show the buffer." | |||
| 2773 | (which-key--stop-timer) | 2774 | (which-key--stop-timer) |
| 2774 | (setq which-key--secondary-timer-active secondary) | 2775 | (setq which-key--secondary-timer-active secondary) |
| 2775 | (setq which-key--timer | 2776 | (setq which-key--timer |
| 2776 | (run-with-idle-timer | 2777 | (run-with-idle-timer (or delay which-key-idle-delay) |
| 2777 | (if delay | 2778 | t #'which-key--update))) |
| 2778 | delay | ||
| 2779 | which-key-idle-delay) t #'which-key--update))) | ||
| 2780 | 2779 | ||
| 2781 | (defun which-key--stop-timer () | 2780 | (defun which-key--stop-timer () |
| 2782 | "Deactivate idle timer for `which-key--update'." | 2781 | "Deactivate idle timer for `which-key--update'." |