From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103075: * lisp/simple.el (special-mode-map): Bind "h" to `describe-mode'; Date: Sat, 19 Feb 2011 20:50:43 -0500 Organization: disorganization Message-ID: <87aahrtqx8.fsf@gnu.org> References: <87ei7m3tc0.fsf@sysu76.podval.org> Reply-To: sds@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1298166667 8391 80.91.229.12 (20 Feb 2011 01:51:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2011 01:51:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 20 02:51:03 2011 Return-path: Envelope-to: ged-emacs-devel@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 1PqyRy-00088k-IY for ged-emacs-devel@m.gmane.org; Sun, 20 Feb 2011 02:51:02 +0100 Original-Received: from localhost ([127.0.0.1]:42785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqyRv-0006Ul-La for ged-emacs-devel@m.gmane.org; Sat, 19 Feb 2011 20:50:59 -0500 Original-Received: from [140.186.70.92] (port=56723 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqyRr-0006Ue-Lx for emacs-devel@gnu.org; Sat, 19 Feb 2011 20:50:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqyRq-0003kc-IA for emacs-devel@gnu.org; Sat, 19 Feb 2011 20:50:55 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:50863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqyRq-0003kX-BN for emacs-devel@gnu.org; Sat, 19 Feb 2011 20:50:54 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PqyRm-000815-43 for emacs-devel@gnu.org; Sun, 20 Feb 2011 02:50:50 +0100 Original-Received: from ool-4575b832.dyn.optonline.net ([69.117.184.50]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Feb 2011 02:50:50 +0100 Original-Received: from sds by ool-4575b832.dyn.optonline.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Feb 2011 02:50:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 26 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ool-4575b832.dyn.optonline.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Mail-Copies-To: never X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Cancel-Lock: sha1:AEuJwT7mDrgzfFGVqSBpW018hho= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:136257 Archived-At: > * Stefan Monnier [2011-02-07 10:15:21 -0500]: > >>> 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? > > Because this (defvar child-mode-map (make-sparse-keymap)) is only there > for those rare derived modes that don't bother to define their own > mode map. In 99% of the cases, this defvar will be a no-op. you probably mean "modify the mode map", not "define". however, this still does not explain why there should be two (defvar child-mode-map) forms in the same file. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 10.04 (lucid) http://jihadwatch.org http://openvotingconsortium.org http://camera.org http://dhimmi.com http://thereligionofpeace.com Beliefs divide, doubts unite.