help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

global-set-key with function taking arguments


From: jai-bholeki
Subject: global-set-key with function taking arguments
Date: Sun, 01 Nov 2020 09:53:35 +0000

This is the way I set a keybinding
(global-set-key (kbd "C-H-<down>") 'transpose-paragraphs)

To set a keybinding with a function taking parameters, I use
(global-set-key (kbd "C-H-<up>")
( lambda () (interactive) (transpose-paragraphs -1) )
)

However, may one write
(global-set-key (kbd "C-H-<up>") '(transpose-paragraphs -1) )

reply via email to

[Prev in Thread] Current Thread [Next in Thread]