From: Tino Calancha <tino.calancha@gmail.com>
To: Allen Li <vianchielfaura@gmail.com>
Cc: 28008@debbugs.gnu.org
Subject: bug#28008: 25.2; Resume kmacro definition errors C-u C-u <F3>
Date: Tue, 08 Aug 2017 14:26:54 +0900 [thread overview]
Message-ID: <87d1867hpd.fsf@calancha-pc> (raw)
In-Reply-To: <CAJr1M6fxVpiZTOym9mOZm20DmNB=nCCcruCb=fTLMHRaPGGHfw@mail.gmail.com> (Allen Li's message of "Mon, 7 Aug 2017 21:10:50 -0700")
Allen Li <vianchielfaura@gmail.com> writes:
> Reproduction:
>
> 1. emacs -Q
> 2. F3
> 3. Type some stuff (asdfasdf)
> 4. C-g
> 5. C-u C-u F3
>
> Expected: kmacro definition resumes
>
> Actual: error
>
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> start-kbd-macro(t t)
Thank you for the report.
I)
Isn't it this behavior expected?
C-g ends `start-kbd-macro' before any macro has
being saved; i.e., `last-kbd-macro' is nil, so we cannot append to it.
You must have a saved macro to append:
emacs -Q
F3
(insert "a") RET
F4 ; save it in `last-kbd-macro'
C-u C-u F3 ; Apped to it.
(insert "b") RET
F4 ; Save it.
F4 ; This insert "ab" in the current buffer.
2)
Expected or not, i think `kmacro-start-macro' might throw an error
when the user wants to append and `start-kbd-macro' is nil.
--8<-----------------------------cut here---------------start------------->8---
commit 9c86eed0b015950a4ae06243c5807d9b864eb69f
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Tue Aug 8 14:14:55 2017 +0900
Append kbd macro only if last-kbd-macro is non-nil
* lisp/kmacro.el (kmacro-start-macro): Append only if
last-kbd-macro is non-nil (Bug#28008).
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 2db8061fa4..8eff7e5c2e 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -584,7 +584,8 @@ kmacro-start-macro
kmacro-last-counter kmacro-counter
kmacro-counter-format kmacro-default-counter-format
kmacro-counter-format-start kmacro-default-counter-format))
-
+ (when (and append (null last-kbd-macro))
+ (user-error "No kbd macro has been defined"))
(start-kbd-macro append
(and append
(if kmacro-execute-before-append
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-08-08
Repository revision: c3445aed51944becb3e58f5dace8121c0021f6c7
next prev parent reply other threads:[~2017-08-08 5:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 4:10 bug#28008: 25.2; Resume kmacro definition errors C-u C-u <F3> Allen Li
2017-08-08 5:26 ` Tino Calancha [this message]
2017-08-08 17:16 ` Allen Li
2017-08-11 12:41 ` Tino Calancha
2017-08-11 13:00 ` Eli Zaretskii
2017-08-11 13:17 ` Tino Calancha
2017-08-12 3:03 ` Tino Calancha
2017-08-13 21:13 ` Allen Li
2017-09-18 20:02 ` Allen Li
2017-09-19 7:42 ` Allen Li
2017-09-30 3:47 ` Allen Li
2017-09-30 4:20 ` Tino Calancha
2017-09-30 13:48 ` Eli Zaretskii
2020-08-24 14:07 ` Lars Ingebrigtsen
2018-09-09 0:23 ` Allen Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1867hpd.fsf@calancha-pc \
--to=tino.calancha@gmail.com \
--cc=28008@debbugs.gnu.org \
--cc=vianchielfaura@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.