unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Basic elisp question: bind key to function with arg
@ 2015-01-25 23:12 Tory S. Anderson
  2015-01-25 23:16 ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Tory S. Anderson @ 2015-01-25 23:12 UTC (permalink / raw)
  To: emacs list

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? 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-25 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-25 23:12 Basic elisp question: bind key to function with arg Tory S. Anderson
2015-01-25 23:16 ` Dmitry Gutov
2015-01-25 23:57   ` Marcin Borkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).