Skip to content

How can I bind "F" to negative-argument -> meow-find ? #638

Closed Answered by eshrh
kartikynwa asked this question in Q&A
Discussion options

You must be logged in to vote

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 (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 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kartikynwa
Comment options

Answer selected by kartikynwa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants