From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Doc of keyboard macros Date: Mon, 24 Sep 2018 10:47:55 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537800364 3794 195.159.176.226 (24 Sep 2018 14:46:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Sep 2018 14:46:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 24 16:46:00 2018 Return-path: Envelope-to: ged-emacs-devel@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 1g4S7b-0000q8-Jk for ged-emacs-devel@m.gmane.org; Mon, 24 Sep 2018 16:45:59 +0200 Original-Received: from localhost ([::1]:45576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4S9h-0007EP-SS for ged-emacs-devel@m.gmane.org; Mon, 24 Sep 2018 10:48:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4S9Z-0007EK-Dc for emacs-devel@gnu.org; Mon, 24 Sep 2018 10:48:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4S9V-000438-Eh for emacs-devel@gnu.org; Mon, 24 Sep 2018 10:48:01 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:43970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4S9V-00042d-9k for emacs-devel@gnu.org; Mon, 24 Sep 2018 10:47:57 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w8OEltrU017622; Mon, 24 Sep 2018 10:47:56 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B698964089; Mon, 24 Sep 2018 10:47:55 -0400 (EDT) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered TRK_NCM1=0.1, EDT_SA_DN_PASS=0, RV6380=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6380> : inlines <6892> : streams <1799387> : uri <2717134> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:230017 Archived-At: https://emacs.stackexchange.com/questions/44918 points out that `C-x (` and `C-x e` are not very visible in the doc, while F3 and F4 may be difficult to reach on Apple's machines (and I just saw that they are also difficult to reach on my Debian machine for some reason). So I suggest making the "old" keyboard macro bindings a bit more prominent in the doc (I also happen to prefer them over F3 and F4, because of their mnemonic value). Any objection to the patch below for emacs-26? Stefan diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index dac41fdb87..e71f23632d 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -47,19 +47,27 @@ Keyboard Macros @node Basic Keyboard Macro @section Basic Use -@table @kbd -@item @key{F3} +@table @asis +@item @kbd{C-x (} or @key{F3} Start defining a keyboard macro (@code{kmacro-start-macro-or-insert-counter}). -@item @key{F4} -If a keyboard macro is being defined, end the definition; otherwise, -execute the most recent keyboard macro -(@code{kmacro-end-or-call-macro}). -@item C-u @key{F3} -Re-execute last keyboard macro, then append keys to its definition. -@item C-u C-u @key{F3} -Append keys to the last keyboard macro without re-executing it. -@item C-x C-k r + +When invoked with a @kbd{C-u} prefix, it first re-executes the last +keyboard macro and then appends keys to its definition. + +When invoked with a double @kbd{C-u C-u} +it append keys to the last keyboard macro without re-executing it. + +@item @kbd{C-x e} or @key{F4} +Execute the most recent keyboard macro. If a keyboard macro is being +defined, end the definition. + +For historical reasons, the two bindings are subtly different: if +invoked while a macro is being defined, @key{F4} only ends the current +definition, while @kbd{C-x e} additionally immediately executes the +just defined macro. + +@item @kbd{C-x C-k r} Run the last keyboard macro on each line that begins in the region (@code{apply-macro-to-region-lines}). @end table