all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.