[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103075: * lisp/simple.el (specia

From: Sam Steingold
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103075: * lisp/simple.el (special-mode-map): Bind "h" to `describe-mode';
Date: Sat, 05 Feb 2011 19:22:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> * Stefan Monnier <address@hidden> [2011-02-05 14:24:57 -0500]:
>> -(defvar bookmark-bmenu-mode-map
>> -  (let ((map (make-keymap)))
> [...]
>> +(define-key bookmark-bmenu-mode-map "q" 'quit-window)
>> +(define-key bookmark-bmenu-mode-map "v" 'bookmark-bmenu-select)
> This change, along with other similar ones you made in the above commit
> is wrong.  Keymaps need to be defined within their `defvar'.
> The use of define-derived-mode makes no difference to it.

I am confused.
(macroexpand '(define-derived-mode child-mode parent-mode "mode name"))
clearly shows
(defvar child-mode-map (make-sparse-keymap))
why do I need a separate defvar?

Sam Steingold (http://sds.podval.org/) on Ubuntu 10.04 (lucid)
http://mideasttruth.com http://www.PetitionOnline.com/tap12009/
http://openvotingconsortium.org http://memri.org http://thereligionofpeace.com
Live Lisp and prosper.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]