[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making a key undefined again
From: |
Stefan Monnier |
Subject: |
Re: Making a key undefined again |
Date: |
Mon, 25 Oct 2021 13:31:33 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> (defun kmu-remove-key (keymap key)
[...]
> (if (= (length key) 1)
> (delete key keymap)
This means that it can also affect a parent keymap.
In my book this is an absolute no-no: you should never be able to modify
the parent when accessed from a child.
Also, AFAIK the only difference between a nil binding and "no binding at
all" is whether it can hide bindings from the parent, but if you also remove
the binding from the parent, then you end up with the same result as a nil
binding, no?
> Maybe the code could be simplified; it has been a long time since
> I wrote that, with a little help from my friends. But I hope the
> doc-string makes it clear why something like this is desirable.
Actually, it didn't make it clear for me. I hope I understand the
differences between an `undefined` binding, a `nil ` binding, and no
binding at all, but I don't know why unsetting a key is important and
even less when unsetting it by making it have no binding at all
is necessary.
Stefan
- Re: Moving kbd to subr.el, (continued)
- Re: Moving kbd to subr.el, Lars Ingebrigtsen, 2021/10/20
- Re: Moving kbd to subr.el, T.V Raman, 2021/10/19
- Re: Moving kbd to subr.el, Dmitry Gutov, 2021/10/19
- Re: Moving kbd to subr.el, Gregory Heytings, 2021/10/19
- Re: Moving kbd to subr.el, Gregory Heytings, 2021/10/19
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/19
- Re: Moving kbd to subr.el, Juri Linkov, 2021/10/19
- Making a key undefined again, Jonas Bernoulli, 2021/10/25
- RE: [External] : Making a key undefined again, Drew Adams, 2021/10/25
- Re: Making a key undefined again, Lars Ingebrigtsen, 2021/10/25
- Re: Making a key undefined again,
Stefan Monnier <=
- Re: Making a key undefined again, Gregory Heytings, 2021/10/25
- Re: Making a key undefined again, Jonas Bernoulli, 2021/10/25
- Re: Making a key undefined again, Jonas Bernoulli, 2021/10/25
- Re: Making a key undefined again, Stefan Monnier, 2021/10/25
- Re: Making a key undefined again, Gregory Heytings, 2021/10/25
- Re: Making a key undefined again, Jonas Bernoulli, 2021/10/26
- Re: Making a key undefined again, Stefan Monnier, 2021/10/26
- Re: Moving kbd to subr.el, Juri Linkov, 2021/10/18
- Re: Moving kbd to subr.el, Gregory Heytings, 2021/10/18
- Re: Moving kbd to subr.el, Lars Ingebrigtsen, 2021/10/18