unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to set key binding in script run-time
@ 2019-06-09 11:34 Budi
  2019-06-09 11:45 ` Emanuel Berg via help-gnu-emacs
  0 siblings, 1 reply; 2+ messages in thread
From: Budi @ 2019-06-09 11:34 UTC (permalink / raw)
  To: help-gnu-emacs

How to set key binding in lisp script run-time of emacs ?

if a key binding only will be created with late decision as a function
is running, how should that key binding be constructed and
accomplished in the run time inside that function ?



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

* Re: How to set key binding in script run-time
  2019-06-09 11:34 How to set key binding in script run-time Budi
@ 2019-06-09 11:45 ` Emanuel Berg via help-gnu-emacs
  0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg via help-gnu-emacs @ 2019-06-09 11:45 UTC (permalink / raw)
  To: help-gnu-emacs

Budi wrote:

> How to set key binding in lisp script
> run-time of emacs ?
>
> if a key binding only will be created with
> late decision as a function is running, how
> should that key binding be constructed and
> accomplished in the run time inside that
> function ?

I suppose, the same way you do it anywhere
else :)

(defun set-key-inside-function ()
  (interactive)
  (global-set-key
   "\C-\\"
   (lambda () (interactive) (message "it worked")) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

end of thread, other threads:[~2019-06-09 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-09 11:34 How to set key binding in script run-time Budi
2019-06-09 11:45 ` Emanuel Berg via help-gnu-emacs

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).