Skip to content

Commit

Permalink
Add meow-keypad-message-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
DogLooksGood committed Dec 11, 2024
1 parent 73f2dd2 commit 3f8f5f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions meow-keypad.el
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,9 @@ Argument CONTROL, non-nils stands for current input is prefixed with Control."
(max-mini-window-height 1.0))
(save-window-excursion
(with-temp-message
(format "%s\nKEYPAD: %s%s"
(format "%s\n%s%s%s"
msg
meow-keypad-message-prefix
(let ((pre (meow--keypad-format-prefix)))
(if (string-blank-p pre)
""
Expand Down Expand Up @@ -374,8 +375,9 @@ Returning DEF will result in a generated title."
(defun meow--keypad-show-message ()
"Show message for current keypad input."
(let ((message-log-max))
(message "KEYPAD%s: %s%s"
(if meow--keypad-help " describe key" "")
(message "%s%s %s%s"
meow-keypad-message-prefix
(if meow--keypad-help "(describe key)" "")
(let ((pre (meow--keypad-format-prefix)))
(if (string-blank-p pre)
""
Expand Down
2 changes: 1 addition & 1 deletion meow-shims.el
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ Argument ENABLE non-nil means turn on."
which-key-use-C-h-commands nil
meow-keypad-describe-keymap-function
(lambda (keymap)
(which-key--create-buffer-and-show nil keymap nil (concat "Meow: " (meow--keypad-format-keys))))
(which-key--create-buffer-and-show nil keymap nil (concat meow-keypad-message-prefix (meow--keypad-format-keys))))
meow-keypad-clear-describe-keymap-function 'which-key--hide-popup)

(setq meow-keypad-describe-keymap-function 'meow-describe-keymap
Expand Down
4 changes: 4 additions & 0 deletions meow-var.el
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,10 @@ If `meow-replace-pop' is run and the previous command is not
`meow-replace-pop' signals an error."
:type '(alist :key-type function :value-type natnum))

(defcustom meow-keypad-message-prefix "Keypad: "
"The prefix string for keypad messages."
:type 'string)

(defvar meow--replace-pop-index nil
"The index of the previous replacement in the `kill-ring'.
See also the command `meow-replace-pop'.")
Expand Down

0 comments on commit 3f8f5f3

Please sign in to comment.