all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jai-bholeki via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: global-set-key with function taking arguments
Date: Sun, 01 Nov 2020 09:53:35 +0000	[thread overview]
Message-ID: <SX1-gkJyoZpdgAposOp1WacciLWFVC-MdAsyK0lSBOTnedMIbdqjYfTxNz7jV2By1G4_LkpoGkMp40dWVrMGYF8WMQU9sX_UX_5sAkHeK0w=@protonmail.com> (raw)

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	other threads:[~2020-11-01  9:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-01  9:53 jai-bholeki via Users list for the GNU Emacs text editor [this message]
2020-11-01 10:57 ` global-set-key with function taking arguments William Xu
2020-11-01 11:33   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 11:47     ` Christopher Dimech
2020-11-01 12:21       ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 12:28         ` Christopher Dimech
2020-11-01 12:57           ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 13:19             ` Christopher Dimech
2020-11-01 13:37               ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 14:08                 ` Christopher Dimech
2020-11-01 14:56                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 23:38                     ` Corwin Brust
2020-11-01 13:05     ` William Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='SX1-gkJyoZpdgAposOp1WacciLWFVC-MdAsyK0lSBOTnedMIbdqjYfTxNz7jV2By1G4_LkpoGkMp40dWVrMGYF8WMQU9sX_UX_5sAkHeK0w=@protonmail.com' \
    --to=help-gnu-emacs@gnu.org \
    --cc=jai-bholeki@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.