all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 14135@debbugs.gnu.org
Subject: bug#14135: <f4> not recording macro
Date: Fri, 05 Apr 2013 15:28:21 +0800	[thread overview]
Message-ID: <m1sj35e8ru.fsf@gmail.com> (raw)
In-Reply-To: <CAAeL0SR+d_4eTCFuvQCuvvj=0NwJJrp6m-NzLUXcSj3z2vHcxg@mail.gmail.com> (Juanma Barranquero's message of "Wed, 3 Apr 2013 23:53:22 +0200")

On 2013-04-04 05:53 +0800, Juanma Barranquero wrote:
> Package: emacs
> Version: 24.3.50
>
> emacs -Q
> <f3>    ;; Defining kbd macro...
> a
> <f4>    ;; Keyboard macro defined
> <f4>    ;; No kbd macro has been defined

Thanks for the bug report. Sorry this is broken by my commit.

Could you give the following patch a good test? Thanks a lot. -- Leo

diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index c08f49df..d6de2feb 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -631,11 +631,11 @@ (defun kmacro-call-macro (arg &optional no-repeat end-macro macro)
                                   (> (length (this-single-command-keys)) 1))
                              ;; Used when we're in the process of repeating.
                              (eq no-repeat 'repeating))
-			 last-input-event))
-	(last-kbd-macro (or macro last-kbd-macro)))
+			 last-input-event)))
     (if end-macro
-	(kmacro-end-macro arg)
-      (call-last-kbd-macro arg #'kmacro-loop-setup-function))
+	(kmacro-end-macro arg)		; modifies last-kbd-macro
+      (let ((last-kbd-macro (or macro last-kbd-macro)))
+	(call-last-kbd-macro arg #'kmacro-loop-setup-function)))
     (when (consp arg)
       (setq arg (car arg)))
     (when (and (or (null arg) (> arg 0))
@@ -658,7 +658,9 @@ (defun kmacro-call-macro (arg &optional no-repeat end-macro macro)
          (define-key map (vector repeat-key)
            `(lambda () (interactive)
               (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg)
-                                 'repeating nil ,last-kbd-macro)))
+                                 'repeating nil ,(if end-macro
+						     last-kbd-macro
+						   (or macro last-kbd-macro)))))
          map)))))






  reply	other threads:[~2013-04-05  7:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 21:53 bug#14135: <f4> not recording macro Juanma Barranquero
2013-04-05  7:28 ` Leo Liu [this message]
2013-04-05  8:28   ` Juanma Barranquero
2013-04-05  8:40     ` Leo Liu

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=m1sj35e8ru.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=14135@debbugs.gnu.org \
    --cc=lekktu@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.