How can I bind "F" to negative-argument -> meow-find ? #638
-
My elispfu is terrible. Is this possible? I tried this in the meow-config:
But obviously it doesn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, it's very possible: (meow-normal-define-key
'("F" . (lambda ()
(interactive)
(let ((current-prefix-arg -1))
(call-interactively 'meow-find))))) You're close... lambdas need to be in their own s-expressions, and see https://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html for relevant info about prefix args. Note that for all keybindings, the "target" needs to be a command, that is, it contains In my custom config, you'll find this section that defines convenience commands for both find and till: (defmacro nt--call-negative (form)
`(let ((current-prefix-arg -1))
(call-interactively ,form)))
(defun nt-negative-find ()
(interactive)
(nt--call-negative 'meow-find))
(defun nt-negative-till ()
(interactive)
(nt--call-negative 'meow-till)) You might find these helpful to include in your own. |
Beta Was this translation helpful? Give feedback.
Yes, it's very possible:
You're close... lambdas need to be in their own s-expressions, and see https://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html for relevant info about prefix args. Note that for all keybindings, the "target" needs to be a command, that is, it contains
(interactive)
.In my custom config, you'll find this section that defines convenience commands for both find and till:
https://github.com/eshrh/nyaatouch/blob/5277c1b597bb0fa060783c3ce5052a9771ee5d61/nyaatouch.el#L37-L47
(defmacro