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#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Date: Thu, 28 May 2015 14:12:16 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1432847609 20641 80.91.229.3 (28 May 2015 21:13:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 May 2015 21:13:29 +0000 (UTC) To: 20687@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 28 23:13:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yy573-0001nH-SH for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 May 2015 23:13:14 +0200 Original-Received: from localhost ([::1]:60783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy572-0007C5-U6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 May 2015 17:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56w-0007Ay-QQ for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:13:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy56t-0006Ws-7j for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:13:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56t-0006Wk-42 for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yy56s-000137-SB for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 May 2015 21:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14328475523991 (code B ref -1); Thu, 28 May 2015 21:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2015 21:12:32 +0000 Original-Received: from localhost ([127.0.0.1]:59839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy56N-00012I-Po for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59972) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy56L-000122-3g for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy56F-0006Mn-0E for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12:23 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56E-0006Mj-U0 for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56D-0006t9-Mv for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:12:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy56A-0006Lf-Fb for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:12:21 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:33939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56A-0006LU-96 for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:12:18 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4SLCGqg012695 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 May 2015 21:12:17 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t4SLCG2U004245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 28 May 2015 21:12:16 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t4SLCG5w004274 for ; Thu, 28 May 2015 21:12:16 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:103285 Archived-At: You can bind any key you like in `query-replace-map'. But `perform-replace', in effect, hard-codes the keys that it recognizes. This is not necessary. You shbould be able to bind a new key in that map to some command, and have `perform-replace' invoke that command. All that's required for this is to add another `cond' clause, just before the final `t' (otherwise) clause, to do this: (cond ... (def (call-interactively def)) ; User-defined key - invoke it. (t ;; Note: we do not need to treat `exit-prefix' ;; specially here, since we reread ;; any unrecognized character. ...)) It seems silly for the code to be written like it is. We already look up the key you press in the q-r keymap. If we find a DEF that is not one of those predefined by Emacs then we ignore it? That makes no sense (to me). In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2014-10-20 on LEG570 Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking=3Dyes,glyphs CPPFLAGS=3D-DGLYPH_DEBUG=3D1'