From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: repeatable vs. non-repeatable commands Date: Sun, 25 Jun 2017 06:56:45 +0200 Message-ID: <87mv8wk6lu.fsf@drachen> References: <8760floqo9.fsf@drachen> <86podtya9v.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498366647 25312 195.159.176.226 (25 Jun 2017 04:57:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 04:57:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 25 06:57:23 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOzbs-0006GE-Fy for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jun 2017 06:57:20 +0200 Original-Received: from localhost ([::1]:41248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOzbx-0007pe-K8 for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jun 2017 00:57:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOzbS-0007pJ-Q6 for help-gnu-emacs@gnu.org; Sun, 25 Jun 2017 00:56:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOzbN-0003GA-Vw for help-gnu-emacs@gnu.org; Sun, 25 Jun 2017 00:56:54 -0400 Original-Received: from mout.web.de ([212.227.15.4]:51963) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOzbN-0003F9-Kh for help-gnu-emacs@gnu.org; Sun, 25 Jun 2017 00:56:49 -0400 Original-Received: from drachen.dragon ([92.74.161.87]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MZzln-1d3DDl3d3H-00LmI9; Sun, 25 Jun 2017 06:56:46 +0200 In-Reply-To: <86podtya9v.fsf@zoho.com> (Emanuel Berg's message of "Sat, 24 Jun 2017 12:01:32 +0200") X-Provags-ID: V03:K0:Fj5R5PbiIVHzVekp6CZoA60MRuPNQgsFzsBauXA6Y8jkGq7JOgB PGciO4ExQviyFeXX9mMimimJWM6ZZjV7maw853OBpVQOXmBsd80r2ZOz8p3ohgfF912BtJl W8HCGnuyHgXXUehd/GCZpWgHikp+JPdoHbxVMuY7YnA8VcoowB916LCUqwO4r/Kpt1gd+Lf Glm9sAk5Tf/GWQNxfarAw== X-UI-Out-Filterresults: notjunk:1;V01:K0:2v4/h6/+rcc=:p3R5L0Aj8vgV5lqaBQbYA3 UfotxjxdDPGqOk4B/EM1oE9mXKQflzLLvc7GZApnieTtcPVCbh+M+BoRM8zHhPOsvPNLZyzdb 4/R0n1rf5gqhYZbxlbQDbwhlwXA85kk/jzzGPi28eZtOfkMoaNuS3oVsqbZ04hF2+gYsQEmoQ yuucxbhgXWaACgX12mK/OyKYN+AhC4+pib+Y1NPsTVsTvfnn6vKP4UrjenbzBLY9nNN+VCV8R dqw/6WuTHp3fa00Fydt6d2PagJbj9ds1OixVWp2/BPwDxKICaBr7PFJPEPPp4OMxvprKlyiYi TlnP1yGBAWgvxhnbwjojdXCoVSUIEbzI3DvxnHtMViYKgxu1WItve8lhBGpRs8r0T/pjfhEfZ dCpYC7m7kbxlLAvS6wIElLjiop+d9+PVDWvCFRcf06mGb1WBBe2Spn/AbhiRiz3+tp6Oqw4q8 k9qMpxI7+ESX+3kocJevcON4YneMFCIGCtFn6lc3AJ1YB8JbA8KEfe/hOCcXsq2fGcp23GZiG LWFj6cP/eL2Zrf0UX2QZOEgEtcSIz6UJHved4e+7gqqo8hUhE9MQF2Uu8338WVJk2qQVscXvT xZn+5lZpQEPe5DAD+O2ji5iPI7Ccq1pGxXux8DVlzxLMAKDP7gw0ZcrPT+JBAXMCLMm1lEdfG qNBfNL+A3GX5KMUaAUMZf6K0XjJ9s0ZIZURHKSswz5LggjjLGy5IuuyPbMWeuuJe9V8rpdOsB hTb3J60nUFMKnqQJORM4AfddwRjW9Zb4QbPOuWh2wdF3dyq/aBrfpBbJiZy4o0DWftwCZD3p X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.4 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113561 Archived-At: Emanuel Berg writes: > (define-prefix-command 'C-o-prefix) > (global-set-key "\C-o" 'C-o-prefix) > > (global-set-key "\C-od" (lambda () (interactive) (message "d"))) > (global-set-key "\C-oD" (lambda () (interactive) (message "D"))) > > ... no? That only solves the easy part (defining a prefix key), but not the hard. The heard part is: (global-set-key "\C-od" #'the-function) should make C-o d d message "d" two times. But with the same named command, binding (global-set-key "\C-D" #'the-function) (that is, control-shift-d) should not make typing C-D d message "d" two times. Instead, only C-D should call the command, and the following d is not special (i.e. calls self-insert-command). That means, I need to decide whether I have to establish a transient map in the body of `the-function' base on the keys hit, and how I can do that correctly is my question. Thanks, Michael.