From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: confusion on keymap's forms in doc Date: Mon, 27 Oct 2008 23:41:40 -0700 (PDT) Organization: http://groups.google.com Message-ID: <98fd48a8-2178-48fe-b8a9-c01f3c35bc3e@f37g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1225179656 28469 80.91.229.12 (28 Oct 2008 07:40:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2008 07:40:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 28 08:41:58 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KujD9-0004H4-Oo for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 08:41:56 +0100 Original-Received: from localhost ([127.0.0.1]:48928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KujC2-00071k-Pd for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 03:40:46 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!f37g2000pri.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 92 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1225176100 13459 127.0.0.1 (28 Oct 2008 06:41:40 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 28 Oct 2008 06:41:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f37g2000pri.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163860 comp.emacs:97277 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59201 Archived-At: here's something unclear to me: According to the manual http://xahlee.org/elisp/Format-of-Keymaps.html quote: =C2=AB Each keymap is a list whose CAR is the symbol `keymap'. The remaining elements of the list define the key bindings of the keymap. ... Here as an example is the local keymap for Lisp mode, a sparse keymap. It defines bindings for and , plus `C-c C-l', `M-C-q', and `M-C-x'. lisp-mode-map =3D> (keymap (3 keymap ;; C-c C-z (26 . run-lisp)) (27 keymap ;; `M-C-x', treated as ` C-x' (24 . lisp-send-defun) keymap ;; `M-C-q', treated as ` C-q' (17 . indent-sexp)) ;; This part is inherited from `lisp-mode-shared-map'. keymap ;; (127 . backward-delete-char-untabify) (27 keymap ;; `M-C-q', treated as ` C-q' (17 . indent-sexp)) (9 . lisp-indent-line)) =C2=BB if we look at the lisp-mode-map example above, it has 5 items. (not counting the first item =E2=80=9Ckeymap=E2=80=9D, and the third item =E2=80= =98keymap=E2=80=99 is probably typo orphaned from above comment line=E2=80=9D) If we look at the item (3 keymap ;; C-c C-z (26 . run-lisp)) this does not seem to be one of the form specified for allowed elements in a keymap. The doc says the following form is allowed: =C2=AB (type . binding) (t . binding) char-table string =C2=BB Should the doc add a form =E2=80=9C(type . keymap)=E2=80=9D? also, in: http://xahlee.org/elisp/Inheritance-and-Keymaps.html it says: =C2=ABA keymap can inherit the bindings of another keymap, which we call the parent keymap. Such a keymap looks like this: (keymap bindings... . parent-keymap) =C2=BB if i understand it correctly, when expanded, such a keymap looks like this: (keymap element-1 element-2 element-3 ... element-n symbolOfParentKeymap ) So, effectively, such a keymap is effectively having a symbolOfParentKeymap appended to the original keymap list. Is that right? Xah =E2=88=91 http://xahlee.org/ =E2=98=84