* buffer-local keymaps
@ 2012-01-12 13:43 Roland Winkler
2012-01-12 15:59 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Roland Winkler @ 2012-01-12 13:43 UTC (permalink / raw)
To: emacs-devel
A proper solution of bug#10254 (a bug in lisp/textmodes/bibtex.el)
requires that bibtex-mode uses not only buffer-local variables but
also buffer-local keymaps (for buffer-local menus). What is the best
way to implement this? Is it possible to define a default keymap for
the buffer-local keymaps similar to the default value of
buffer-local variables? Or is it necessary that every BibTeX buffer
uses a buffer-local keymap that is a child keymap of some default
keymap? (In this context, what is the equivalent of
kill-local-variable?) Or do I better use yet some other approach?
Thanks.
Roland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: buffer-local keymaps
2012-01-12 13:43 buffer-local keymaps Roland Winkler
@ 2012-01-12 15:59 ` Stefan Monnier
2012-01-12 19:08 ` Roland Winkler
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2012-01-12 15:59 UTC (permalink / raw)
To: Roland Winkler; +Cc: emacs-devel
> A proper solution of bug#10254 (a bug in lisp/textmodes/bibtex.el)
> requires that bibtex-mode uses not only buffer-local variables but
> also buffer-local keymaps (for buffer-local menus).
There are many different ways to answer this question I think.
If the differences are limited to menus, you can use a single keymap and
rely on things like :filter, :enable, ... to dynamically adapt the
menu's content to the buffer's state.
Otherwise, you can simply use-local-map with a different map in each
buffer (I'd expect those maps to share a common ancestor, of course).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: buffer-local keymaps
2012-01-12 15:59 ` Stefan Monnier
@ 2012-01-12 19:08 ` Roland Winkler
0 siblings, 0 replies; 3+ messages in thread
From: Roland Winkler @ 2012-01-12 19:08 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
On Thu Jan 12 2012 Stefan Monnier wrote:
> > A proper solution of bug#10254 (a bug in lisp/textmodes/bibtex.el)
> > requires that bibtex-mode uses not only buffer-local variables but
> > also buffer-local keymaps (for buffer-local menus).
>
> There are many different ways to answer this question I think.
> If the differences are limited to menus, you can use a single keymap and
> rely on things like :filter, :enable, ... to dynamically adapt the
> menu's content to the buffer's state.
Thanks!
Yes, menus are all I have in mind. So such adaption of a single
keymap might be a better solution ...
> Otherwise, you can simply use-local-map with a different map in each
> buffer (I'd expect those maps to share a common ancestor, of course).
... than local keymaps. I'll look into this.
Roland
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-12 19:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 13:43 buffer-local keymaps Roland Winkler
2012-01-12 15:59 ` Stefan Monnier
2012-01-12 19:08 ` Roland Winkler
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.