From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Larry Evans Newsgroups: gmane.emacs.bugs Subject: bug#7803: 23.1; Need better definition of vector notation in define-key Date: Fri, 07 Jan 2011 21:08:09 -0600 Message-ID: References: <871v4o1kqw.fsf@pop.suddenlink.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294457056 10336 80.91.229.12 (8 Jan 2011 03:24:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 8 Jan 2011 03:24:16 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 08 04:24:12 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PbPPW-0004DC-8z for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jan 2011 04:24:10 +0100 Original-Received: from localhost ([127.0.0.1]:60107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbPPV-0004Fc-MY for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Jan 2011 22:24:09 -0500 Original-Received: from [140.186.70.92] (port=53566 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbPPN-0004E2-US for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 22:24:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbPPM-0002ff-Pi for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 22:24:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbPPM-0002fb-OB for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 22:24:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PbP46-00047l-95; Fri, 07 Jan 2011 22:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Larry Evans Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jan 2011 03:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7803 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.129445567215796 (code B ref -1); Sat, 08 Jan 2011 03:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jan 2011 03:01:12 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PbP3I-00046j-Go for submit@debbugs.gnu.org; Fri, 07 Jan 2011 22:01:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PbP3G-00046X-98 for submit@debbugs.gnu.org; Fri, 07 Jan 2011 22:01:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbPAK-0008LC-2S for submit@debbugs.gnu.org; Fri, 07 Jan 2011 22:08:28 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:53301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbPAK-0008L8-0D for submit@debbugs.gnu.org; Fri, 07 Jan 2011 22:08:28 -0500 Original-Received: from [140.186.70.92] (port=33629 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbPAJ-0001TW-3X for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 22:08:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbPAH-0008Hb-Qf for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 22:08:26 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:54288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbPAH-0008HM-Eg for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 22:08:25 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PbPAF-0007W0-AG for bug-gnu-emacs@gnu.org; Sat, 08 Jan 2011 04:08:23 +0100 Original-Received: from r74-192-28-166.bcstcmta01.clsttx.tl.dh.suddenlink.net ([74.192.28.166]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jan 2011 04:08:23 +0100 Original-Received: from cppljevans by r74-192-28-166.bcstcmta01.clsttx.tl.dh.suddenlink.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jan 2011 04:08:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 66 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: r74-192-28-166.bcstcmta01.clsttx.tl.dh.suddenlink.net User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 07 Jan 2011 22:02:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43206 Archived-At: On 01/07/11 19:50, Glenn Morris wrote: > Larry Evans wrote: > >> Ah, so when it says: >> >> If KEY is `[t]', this sets the default binding in KEYMAP. >> >> it means: > > You're overthinking it. It means literally what it says: a vector with > a single element `t'. Not a vector with any other contents. > `t' in Emacs documentation always means the special symbol `t', for truth. Ah. OK. So if the KEY in (define-key KEYMAP KEY BINDING) is `[t]', then BINDING is ignored, and, I guess, the default binding for *all* keys in KEYMAP are set to the default binding? I guess the "default binding" is self-insert, IOW. OOPS, now. I finally went to help, entered define-key, and got: > define-key is a built-in function in `C source code'. > > (define-key keymap key def) > > In keymap, define key sequence key as def. > keymap is a keymap. > > key is a string or a vector of symbols and characters meaning a > sequence of keystrokes and events. Non-ASCII characters with codes > above 127 (such as ISO Latin-1) can be included if you use a vector. > Using [t] for key creates a default definition, which applies to any > event type that has no other definition in this keymap. which finally cleared things up. This tells me that after: (define KEYMAP [t] DEFAULT_BINDING) then any key, KEY, which has *not* occurred in a call: (define-key KEYMAP KEY def) for some value of def, has the DEFAULT_BINDING in KEYMAP. Is that right? > > Rather than reading the Lispref, the Emacs manual offers a better > introduction to key bindings for the purposes of user customization. > > (I admit I couldn't see a clear mention of "S-" = "shift" there, though.) > After fishing around the manual, I found it in the info node, "Other Char Bits" which contains: The Lisp syntax for the shift bit is `\S-'; thus, `?\C-\S-o' or `?\C-\S-O' represents the shifted-control-o character. The ? was a bit mysterious at first, but more fishing showed me what it meant, but I don't remember where that info node is.