From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#3394: marked as done (23.0.94; define-derived-mode keymap inheritance) Date: Wed, 27 May 2009 02:55:06 +0000 Message-ID: References: <8F6FFAD957084AFF895F4896DA0D124C@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1243392906-22751-0" X-Trace: ger.gmane.org 1243393798 31234 80.91.229.12 (27 May 2009 03:09:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 May 2009 03:09:58 +0000 (UTC) To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 27 05:09:55 2009 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.50) id 1M99Wc-0004Co-Gz for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 May 2009 05:09:54 +0200 Original-Received: from localhost ([127.0.0.1]:59803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M99Wb-00073g-Ug for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 May 2009 23:09:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M99W4-0006jz-3D for bug-gnu-emacs@gnu.org; Tue, 26 May 2009 23:09:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M99Vz-0006el-A6 for bug-gnu-emacs@gnu.org; Tue, 26 May 2009 23:09:19 -0400 Original-Received: from [199.232.76.173] (port=59218 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M99Vz-0006ec-2J for bug-gnu-emacs@gnu.org; Tue, 26 May 2009 23:09:15 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:56102) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M99Vy-0000BO-DT for bug-gnu-emacs@gnu.org; Tue, 26 May 2009 23:09:14 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4R39CtQ025433; Tue, 26 May 2009 20:09:12 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n4R2t6kn022785; Tue, 26 May 2009 19:55:06 -0700 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 3394 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:28217 Archived-At: This is a multi-part message in MIME format... ------------=_1243392906-22751-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Tue, 26 May 2009 22:47:33 -0400 with message-id and subject line Re: bug#3394: 23.0.94; define-derived-mode keymap inherita= nce has caused the Emacs bug report #3394, regarding 23.0.94; define-derived-mode keymap inheritance to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 3394: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D3394 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1243392906-22751-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 26 May 2009 22:10:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4QMAlFA015569 for ; Tue, 26 May 2009 15:10:48 -0700 Received: from mail.gnu.org ([199.232.76.166]:57316 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M94r8-0002AP-QK for emacs-pretest-bug@gnu.org; Tue, 26 May 2009 18:10:46 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M94r7-0001M9-6E for emacs-pretest-bug@gnu.org; Tue, 26 May 2009 18:10:46 -0400 Received: from rcsinet12.oracle.com ([148.87.113.124]:50821 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M94r6-0001M1-P0 for emacs-pretest-bug@gnu.org; Tue, 26 May 2009 18:10:45 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4QMAV7h014856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 May 2009 22:10:33 GMT Received: from abhmt002.oracle.com (abhmt002.oracle.com [141.146.116.11]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4QMBS6x032274 for ; Tue, 26 May 2009 22:11:28 GMT Received: from dradamslap1 (/141.144.90.50) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 May 2009 15:10:39 -0700 From: "Drew Adams" To: Subject: 23.0.94; define-derived-mode keymap inheritance Date: Tue, 26 May 2009 15:11:04 -0700 Message-ID: <8F6FFAD957084AFF895F4896DA0D124C@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcneTtytWXeZPjJOTJiuj96/x6wgGg== X-Source-IP: abhmt002.oracle.com [141.146.116.11] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4A1C68E0.00A4:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Reporting this as a bug just in case it is. I don't know. I have a file that requires `buff-menu.el', then does this, to redefine `Buffer-menu-mode'. (when (> emacs-major-version 22) (put 'Buffer-menu-mode 'mode-class 'special) (define-derived-mode Buffer-menu-mode special-mode "Buffer Menu" "..." (set (make-local-variable 'revert-buffer-function) 'Buffer-menu-revert-function) (set (make-local-variable 'buffer-stale-function) #'(lambda (&optional noconfirm) 'fast)) (setq truncate-lines t) (setq buffer-read-only t))) That definition is actually identical to the original definition in buff-menu.el. (In reality, my code adds a bit to the original definition, but the problem occurs also with just the code above. If I byte-compile the file in Emacs 22 or 23, which have `define-derived-mode', then there is no problem. (Likewise, if I load the *.el file instead of the *.elc.) If I byte-compile in Emacs 20 (which does not have `define-derived-mode'), then everything still works as usual, except for one thing: The keymap for `special-mode' is apparently not inherited. So for example, `q' and `g' have no key bindings in the *Buffer List*. By eyeballing it, the *.elc file would seem to be picking up the `define-derived-mode' code as if it were a top-level function call, which is what I would expect. I assume that the macro is defined when the *.elc is loaded, so I would expect that `define-derived-mode' would do its thing normally when the *.elc is loaded. I know that there is no guarantee (quite the opposite) that code byte-compiled in Emacs 20 will work in Emacs 23. But I wonder if there might be a bug here anyway, wrt the keymap inheritance. If not, OK. In that case, I'm just a bit curious what's happening - why everything else seems to work fine, but the `special-mode' keymap doesn't seem to be inherited. In GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600) of 2009-05-24 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' ------------=_1243392906-22751-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3394-done) by emacsbugs.donarmstrong.com; 27 May 2009 02:47:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4R2ld5A022022 for <3394-done@emacsbugs.donarmstrong.com>; Tue, 26 May 2009 19:47:40 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AokFAL9GHErO+JxR/2dsb2JhbACBT8xPhAsFhX0 X-IronPort-AV: E=Sophos;i="4.41,256,1241409600"; d="scan'208";a="39153362" Received: from 206-248-156-81.dsl.teksavvy.com (HELO pastel.home) ([206.248.156.81]) by ironport2-out.teksavvy.com with ESMTP; 26 May 2009 22:47:33 -0400 Received: by pastel.home (Postfix, from userid 20848) id 50BC884B6; Tue, 26 May 2009 22:47:33 -0400 (EDT) From: Stefan Monnier To: Drew Adams Cc: 3394-done@emacsbugs.donarmstrong.com Subject: Re: bug#3394: 23.0.94; define-derived-mode keymap inheritance Message-ID: References: <8F6FFAD957084AFF895F4896DA0D124C@us.oracle.com> Date: Tue, 26 May 2009 22:47:33 -0400 In-Reply-To: <8F6FFAD957084AFF895F4896DA0D124C@us.oracle.com> (Drew Adams's message of "Tue, 26 May 2009 15:11:04 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I know that there is no guarantee (quite the opposite) that code > byte-compiled in Emacs 20 will work in Emacs 23. But I wonder if there > might be a bug here anyway, wrt the keymap inheritance. If not, OK. In Well, yes, there was a bug in Emacs-20's implementation of define-derived-mode. Not much we can do about it, I'm afraid. Stefan ------------=_1243392906-22751-0--