[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Define-key doc string - binding changes always if it exists
From: |
Kevin Rodgers |
Subject: |
Re: Define-key doc string - binding changes always if it exists |
Date: |
Thu, 11 Aug 2005 09:05:57 -0600 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
Lennart Borgman wrote:
> I found the doc string for define-key a bit strange. It kind of suggests
> that if the keymap is not sparse then it is not changed. I suggest the
> following patch:
I don't agree. You've changed:
> -If KEYMAP is a sparse keymap with a binding for KEY, the existing
> -binding is altered. If there is no binding for KEY, the new pair
> -binding KEY to DEF is added at the front of KEYMAP. */)
to:
> +If KEYMAP is a sparse keymap and there is no binding for KEY, the new
> +pair binding KEY to DEF is added at the front of KEYMAP. */)
The original does not say anything about full keymaps (because there is
nothing to add), whereas your version doesn't say anything about a KEY
that's already bound in a sparse KEYMAP.
Your version is close to what's in Emacs 21, which was corrected to
distinguish between a new binding and an altered binding:
| If KEYMAP is a sparse keymap, the pair binding KEY to DEF is added at
| the front of KEYMAP.
--
Kevin Rodgers