|
From: | Dmitry Gutov |
Subject: | Re: Basic elisp question: bind key to function with arg |
Date: | Mon, 26 Jan 2015 01:16:15 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0 |
On 01/26/2015 01:12 AM, torys.anderson@gmail.com (Tory S. Anderson) wrote:
I have the following in my emacs init, and it works fine: (global-set-key [C-up] 'enlarge-window) (global-set-key [C-down] (lambda () (interactive) (enlarge-window -1))) But it seems awkward to me that I need to add all the extra just to pass a -1 arg to the function, so I'm suspecting there's a simpler way to write this. Any tips?
No, that's how you do it. Or you create a named function doing the same, and bind it instead.
[Prev in Thread] | Current Thread | [Next in Thread] |