unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Function for deleting a key binding in a sparse keymap
@ 2005-12-04 23:58 Lennart Borgman
  2005-12-05 16:38 ` Richard M. Stallman
  2005-12-05 19:42 ` Stefan Monnier
  0 siblings, 2 replies; 47+ messages in thread
From: Lennart Borgman @ 2005-12-04 23:58 UTC (permalink / raw)


It would be good to have a function like this in Emacs:

(defun delete-key-in-sparse-map(sparse-map key)
  "In the sparse keymap SPARSE-MAP remove KEY.
In a sparse keymap if a key is bound to nil that means that
invoking that key find no binding in that map.  If instead there
is no binding at all then the default value if any in that keymap
is used.  This function removes any binding of KEY in the sparse
keymap SPARSE-MAP so that the default value will be used.

If SPARSE-MAP is not a sparse keymap an error is raised."

   ...
  )

However I do not know how to implement this for different formats for 
specifying the key.

^ permalink raw reply	[flat|nested] 47+ messages in thread
* Re: Function for deleting a key binding in a sparse keymap
@ 2005-12-08  9:32 LENNART BORGMAN
  2005-12-08 14:24 ` Kim F. Storm
  2005-12-08 16:53 ` Stefan Monnier
  0 siblings, 2 replies; 47+ messages in thread
From: LENNART BORGMAN @ 2005-12-08  9:32 UTC (permalink / raw)
  Cc: emacs-devel

From: storm@cua.dk (Kim F. Storm)

> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
> 
> > I wrote too early once again. I was adding the old bw-keymap to
> > emulation-mode-map-alist, not the new one. When I changed this the
> > above procedures work nicely.
> 
> Why do you use emulation-mode-map-alist ?

Because in this case it is a temporary minor mode that exists just during a few keystrokes. I actually put the keymap first in emulation-mode-map-alists to avoid any problem. Nearly all keys except those for using the mode are bound to a function that exits the temporary mode.

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

end of thread, other threads:[~2005-12-14 20:02 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-04 23:58 Function for deleting a key binding in a sparse keymap Lennart Borgman
2005-12-05 16:38 ` Richard M. Stallman
2005-12-05 16:55   ` Lennart Borgman
2005-12-06 16:42     ` Richard M. Stallman
2005-12-06 17:04       ` Lennart Borgman
2005-12-06 21:26         ` Stefan Monnier
2005-12-06 22:18           ` Lennart Borgman
2005-12-06 22:28             ` Stefan Monnier
2005-12-06 23:01               ` Lennart Borgman
2005-12-07  1:56                 ` Stefan Monnier
2005-12-07  9:56                   ` Lennart Borgman
2005-12-07 10:13                   ` Lennart Borgman
2005-12-07 14:33                     ` Lennart Borgman
2005-12-08  9:10                       ` Kim F. Storm
2005-12-07 17:06         ` Richard M. Stallman
2005-12-07 17:12           ` Lennart Borgman
2005-12-05 19:42 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2005-12-08  9:32 LENNART BORGMAN
2005-12-08 14:24 ` Kim F. Storm
2005-12-08 15:03   ` Lennart Borgman
2005-12-08 16:53 ` Stefan Monnier
2005-12-08 18:36   ` Lennart Borgman
2005-12-08 18:56     ` Stefan Monnier
2005-12-08 23:59       ` Lennart Borgman
2005-12-09 11:24         ` Kim F. Storm
2005-12-09 15:03         ` Richard M. Stallman
2005-12-09 20:12           ` Lennart Borgman
2005-12-10  4:13             ` Richard M. Stallman
2005-12-10 23:45               ` Lennart Borgman
2005-12-11  1:12                 ` Stefan Monnier
2005-12-11  2:16                   ` Lennart Borgman
2005-12-11  8:14                     ` Stefan Monnier
2005-12-11 16:49                     ` Richard M. Stallman
2005-12-11 16:49                 ` Richard M. Stallman
2005-12-12  1:41                   ` Lennart Borgman
2005-12-12 15:52                     ` Stefan Monnier
2005-12-12 17:02                       ` Lennart Borgman
2005-12-13 15:52                         ` Stefan Monnier
2005-12-12 16:18                     ` Richard M. Stallman
2005-12-12 19:09                       ` Lennart Borgman
2005-12-13 17:50                         ` Richard M. Stallman
2005-12-14  0:50                           ` Lennart Borgman
2005-12-14 20:02                             ` Richard M. Stallman
2005-12-10 23:40             ` Kim F. Storm
2005-12-11  0:29               ` Lennart Borgman
2005-12-11  0:54                 ` Lennart Borgman
2005-12-11 16:49                   ` Richard M. Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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