* Set keymap for buffer, not major mode for that buffer
@ 2006-04-09 6:05 Euler Herbert
2006-04-09 8:47 ` Peter Dyballa
0 siblings, 1 reply; 3+ messages in thread
From: Euler Herbert @ 2006-04-09 6:05 UTC (permalink / raw)
Hello,
Elisp manual says "If you change the current buffer's
local map, that usually affects all buffers using the
same major mode." [(info "(elisp)Changing Key Bindings")]
Is it possible to set keymap for a buffer, but only
affects the specific buffer using the same major mode?
Thanks in advance.
Regards,
Guanpeng Xu
_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Set keymap for buffer, not major mode for that buffer
2006-04-09 6:05 Euler Herbert
@ 2006-04-09 8:47 ` Peter Dyballa
0 siblings, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2006-04-09 8:47 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 09.04.2006 um 08:05 schrieb Euler Herbert:
> Is it possible to set keymap for a buffer, but only
> affects the specific buffer using the same major mode?
Yes: create a new buffer specific keymap!
--
Greetings
Pete
(This space left blank for technical reasons.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Set keymap for buffer, not major mode for that buffer
[not found] <mailman.209.1144562752.9609.help-gnu-emacs@gnu.org>
@ 2006-04-10 5:13 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2006-04-10 5:13 UTC (permalink / raw)
> Elisp manual says "If you change the current buffer's
> local map, that usually affects all buffers using the
> same major mode." [(info "(elisp)Changing Key Bindings")]
> Is it possible to set keymap for a buffer, but only
> affects the specific buffer using the same major mode?
Yes. Before doing a `local-set-key', do the following:
(let ((origmap (current-local-map))
(newmap (make-sparse-keymap)))
(set-keymap-parent newmap origmap)
(use-local-map newmap))
-- Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-10 5:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.209.1144562752.9609.help-gnu-emacs@gnu.org>
2006-04-10 5:13 ` Set keymap for buffer, not major mode for that buffer Stefan Monnier
2006-04-09 6:05 Euler Herbert
2006-04-09 8:47 ` Peter Dyballa
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.