From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kalle Olavi Niemitalo Newsgroups: gmane.emacs.devel Subject: Re: other-frame, other-window prefix keys Date: Sun, 09 Aug 2015 11:10:17 +0300 Message-ID: <87r3nchogm.fsf@Niukka.kon.iki.fi> References: <86vbcq2qgc.fsf@stephe-leake.org> <86k2t50ze5.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1439107539 7593 80.91.229.3 (9 Aug 2015 08:05:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Aug 2015 08:05:39 +0000 (UTC) Keywords: Emacs,keymap,ctl-x-4-map,ctl-x-4-prefix Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 09 10:05:28 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZOLbk-0005pJ-CA for ged-emacs-devel@m.gmane.org; Sun, 09 Aug 2015 10:05:28 +0200 Original-Received: from localhost ([::1]:54600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOLbj-00030R-CY for ged-emacs-devel@m.gmane.org; Sun, 09 Aug 2015 04:05:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOLbf-0002yI-Hw for emacs-devel@gnu.org; Sun, 09 Aug 2015 04:05:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOLbb-0007X8-Bt for emacs-devel@gnu.org; Sun, 09 Aug 2015 04:05:23 -0400 Original-Received: from sinikuusama3.dnainternet.net ([83.102.40.156]:36111 helo=sinikuusama2.dnainternet.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOLbb-0007Rz-58 for emacs-devel@gnu.org; Sun, 09 Aug 2015 04:05:19 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by sinikuusama2.dnainternet.net (Postfix) with ESMTP id C8CDC51D0; Sun, 9 Aug 2015 11:05:10 +0300 (EEST) X-Virus-Scanned: DNA Internet at dnainternet.net Original-Received: from sinikuusama2.dnainternet.net ([83.102.40.156]) by localhost (sinikuusama2.dnainternet.net [127.0.0.1]) (DNA Internet, port 10040) with ESMTP id oh1h2lSZhnmD; Sun, 9 Aug 2015 11:05:10 +0300 (EEST) Original-Received: from luumupuu2.dnainternet.net (luumupuu2.dnainternet.net [83.102.40.55]) by sinikuusama2.dnainternet.net (Postfix) with ESMTP id 4551E5130; Sun, 9 Aug 2015 11:05:10 +0300 (EEST) Original-Received: from Niukka.Niemitalo.private (37-136-58-120.rev.dnainternet.fi [37.136.58.120]) by luumupuu2.dnainternet.net (Postfix) with ESMTP id 046796E; Sun, 9 Aug 2015 11:05:03 +0300 (EEST) In-Reply-To: <86k2t50ze5.fsf@stephe-leake.org> (Stephen Leake's message of "Sun, 09 Aug 2015 01:06:10 -0500") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.51 (gnu/linux) X-Accept-Language: fi;q=1.0, en;q=0.9, sv;q=0.5, de;q=0.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 83.102.40.156 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188634 Archived-At: Stephen Leake writes: > I agree it would be nice. I think that means redoing all those bindings. > But that's only about 10, so it's doable. But that doesn't handle > third-party additions to the C-x 4/5 prefix key maps. If those third-party additions are using (define-key ctl-x-4-map (kbd "z") 'foo) rather than (global-set-key (kbd "C-x 4 z") 'foo) then I think you can handle it, by changing ctl-x-4-prefix and ctl-x-5-prefix to functions that temporarily add ctl-x-4-map or ctl-x-5-map as a minor-mode keymap and then read a key sequence. And if they are using global-set-key, then I think it can be hacked around by doing (put 'ctl-x-4-prefix 'define-key-keymap ctl-x-4-map) (put 'ctl-x-5-prefix 'define-key-keymap ctl-x-5-map) and changing define-key to follow the define-key-keymap property if the keymap contains a symbol whose function definition is a function and the key sequence didn't end yet.