From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Define-key doc string - binding changes always if it exists Date: Wed, 10 Aug 2005 23:37:16 +0200 Message-ID: <42FA738C.9020300@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123711848 28025 80.91.229.2 (10 Aug 2005 22:10:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2005 22:10:48 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 11 00:10:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2yl8-0000F5-Ij for ged-emacs-devel@m.gmane.org; Thu, 11 Aug 2005 00:09:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2yoG-0005bi-OX for ged-emacs-devel@m.gmane.org; Wed, 10 Aug 2005 18:12:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E2ykR-0003NY-1P for emacs-devel@gnu.org; Wed, 10 Aug 2005 18:08:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E2ygr-0002FG-BI for emacs-devel@gnu.org; Wed, 10 Aug 2005 18:04:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2ygm-000203-MA for emacs-devel@gnu.org; Wed, 10 Aug 2005 18:04:44 -0400 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E2yUU-00019t-Nb for emacs-devel@gnu.org; Wed, 10 Aug 2005 17:52:02 -0400 Original-Received: from [192.168.123.121] (83.249.204.9) by pne-smtpout2-sn1.fre.skanova.net (7.2.060.1) id 42B937170079B02E for emacs-devel@gnu.org; Wed, 10 Aug 2005 23:37:20 +0200 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Original-To: Emacs Devel X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41882 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41882 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: Index: keymap.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/keymap.c,v retrieving revision 1.306 diff -u -r1.306 keymap.c --- keymap.c 7 Aug 2005 12:33:17 -0000 1.306 +++ keymap.c 10 Aug 2005 19:42:37 -0000 @@ -1105,9 +1105,8 @@ (DEFN should be a valid definition in its own right), or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP. -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. */) +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. */) (keymap, key, def) Lisp_Object keymap; Lisp_Object key;