all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* key binding question
@ 2007-02-10 13:00 Hadron
  2007-02-12  4:42 ` Kevin Rodgers
       [not found] ` <mailman.4372.1171255378.2155.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Hadron @ 2007-02-10 13:00 UTC (permalink / raw)
  To: help-gnu-emacs


Is it to add a new key binding to be local to a specific mode by adding
a hook e.g


(add-hook 'html-mode-hook
	  (lambda ()
	    (local-set-key [f10] 'myfunc)))


or to use define-key on the specific mode-map?e.g

(define-key html-mode-map [f11] 'myfunc)

(assume the html-mode-map variable is instantiated/inscope.

Or to ask another way, why would you choose one over the other and what
might the pitfalls be?

^ permalink raw reply	[flat|nested] 12+ messages in thread
* key binding question
@ 2007-11-03  1:10 Drew Adams
  2007-11-03  1:35 ` Lennart Borgman (gmail)
  2007-11-03 14:12 ` Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: Drew Adams @ 2007-11-03  1:10 UTC (permalink / raw)
  To: Emacs-Devel

I have a user variable `foo' whose value has the same form as a key-sequence
argument to `define-key'. That's all I know.

So, for example, `foo' might have value [S-iso-lefftab] or "\C-e" or [?\C-x
?] or "^E" (i.e. Control-E) or whatever might be acceptable to `define-key'.

How can I, in Lisp, bind command `bar' to `foo's key, but with the Control
and Meta modifiers added. So, for example, if `foo' = [S-iso-lefftab], then
the code would bind `bar' to [C-M-S-iso-lefttab].

If this is too difficult, suppose that `foo's value were guaranteed to
always be a vector - same question.

Can anyone help with this?

^ permalink raw reply	[flat|nested] 12+ messages in thread
* key binding question
@ 2003-04-06  5:05 Kevin Reeder
  2003-04-06 11:14 ` maierh
  2003-04-07 10:10 ` Jerome Besnard
  0 siblings, 2 replies; 12+ messages in thread
From: Kevin Reeder @ 2003-04-06  5:05 UTC (permalink / raw)


When using the python interpreter within emacs, I'd like to have the
up/down arrows echo previous commands. Can anyone give me the code for
this?

Kevin

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

end of thread, other threads:[~2007-11-03 16:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-10 13:00 key binding question Hadron
2007-02-12  4:42 ` Kevin Rodgers
     [not found] ` <mailman.4372.1171255378.2155.help-gnu-emacs@gnu.org>
2007-02-12  9:11   ` Hadron
2007-02-13  6:36     ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2007-11-03  1:10 Drew Adams
2007-11-03  1:35 ` Lennart Borgman (gmail)
2007-11-03 14:12 ` Stefan Monnier
2007-11-03 16:34   ` Drew Adams
2003-04-06  5:05 Kevin Reeder
2003-04-06 11:14 ` maierh
2003-04-07 10:10 ` Jerome Besnard
2003-04-08  4:09   ` Kevin Reeder

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.