From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#10875: 24.0.93; `where-is-internal' and command remapping Date: Thu, 23 Feb 2012 10:16:59 -0800 Message-ID: <500CA4A40EBF4D9E8A9C18A4AD5F0737@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1330021076 3978 80.91.229.3 (23 Feb 2012 18:17:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Feb 2012 18:17:56 +0000 (UTC) To: 10875@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 23 19:17:52 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S0dEh-00087m-C3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Feb 2012 19:17:47 +0100 Original-Received: from localhost ([::1]:40764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0dEg-0006L2-K7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Feb 2012 13:17:46 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0dEZ-0006Kj-9B for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2012 13:17:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0dEV-00017z-6n for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2012 13:17:39 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0dEV-00017s-2m for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2012 13:17:35 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S0dGt-00021P-5s for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2012 13:20:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2012 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.13300211987753 (code B ref -1); Thu, 23 Feb 2012 18:20:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Feb 2012 18:19:58 +0000 Original-Received: from localhost ([127.0.0.1]:52976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0dGj-00020t-7j for submit@debbugs.gnu.org; Thu, 23 Feb 2012 13:19:57 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55307) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0dGg-00020c-B2 for submit@debbugs.gnu.org; Thu, 23 Feb 2012 13:19:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0dE7-00014j-Cb for submit@debbugs.gnu.org; Thu, 23 Feb 2012 13:17:15 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:42966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0dE7-00014d-B3 for submit@debbugs.gnu.org; Thu, 23 Feb 2012 13:17:11 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0dE1-0006H9-Kf for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2012 13:17:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0dE0-00013i-Gb for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2012 13:17:05 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:34978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0dE0-00013X-8f for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2012 13:17:04 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q1NIH2gK024576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Feb 2012 18:17:03 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q1NIH1g7023022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Feb 2012 18:17:01 GMT Original-Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q1NIH0pO013733 for ; Thu, 23 Feb 2012 12:17:00 -0600 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 23 Feb 2012 10:17:00 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AczyV1WBbZAJuUpdTbamTgzpUSd4FQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090206.4F46829F.0037,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57146 Archived-At: Caveat: I'm not real clear on what the behavior is supposed to be. See doc bug #10872. This bug report is about the behavior, not the doc. It seems to differ from what I understand by reading the doc. emacs -Q (defun foobar (&optional n) "@@@@" (interactive) (forward-line 0)) (defvar foo-mode-map (let ((map (make-sparse-keymap))) (define-key map [remap forward-char] 'foobar) map)) (define-minor-mode foo-mode "foo doc" nil nil foo-mode-map :global t :init-value nil) (foo-mode 1) (where-is-internal 'forward-char nil t) ; Returns [6] in Foo mode. In `foo-mode-map', command `forward-char' is remapped to command `foobar', so in Foo mode all keys normally bound to `forward-char' are instead (indirectly) bound to `foobar'. The doc for `where-is-internal' says: When command remapping is in effect (*note Remapping Commands::), `where-is-internal' figures out when a command will be run due to remapping and reports keys accordingly. It also returns `nil' if COMMAND won't really be run because it has been remapped to some other command. However, if NO-REMAP is non-`nil'. `where-is-internal' ignores remappings. I interpret the next-to-last sentence as implying that, in Foo mode, `where-is-internal' should return nil for `forward-char'. Instead, it returns [6], meaning `C-f'. Is this not a bug? If not, what am I missing? In GNU Emacs 24.0.93.1 (i386-mingw-nt5.1.2600) of 2012-02-15 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include'