[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Misleading error message when defining empty keyboar
From: |
martin rudalics |
Subject: |
Re: address@hidden: Misleading error message when defining empty keyboard macro and no keyboard macro has been defined yet.] |
Date: |
Tue, 17 Jul 2007 11:27:43 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
- - Start emacs with -Q
- - Press <f3> and immediately <f4>
Result (in echo area):
Only one keyboard macro defined.
Huh? In fact, there are only *zero* keyboard macros defined (if you do
not count the empty one that has been ignored).
Expected result:
Ignore empty macro
Michael, could you please test the attached patch? Could you also
test whether it has unwanted side-effects? Thanks.
*** kmacro.el Wed Jan 17 09:30:52 2007
--- kmacro.el Tue Jul 17 11:25:20 2007
***************
*** 606,613 ****
(unless executing-kbd-macro
(end-kbd-macro arg #'kmacro-loop-setup-function)
(when (and last-kbd-macro (= (length last-kbd-macro) 0))
(message "Ignore empty macro")
! (kmacro-pop-ring))))
;;;###autoload
--- 606,616 ----
(unless executing-kbd-macro
(end-kbd-macro arg #'kmacro-loop-setup-function)
(when (and last-kbd-macro (= (length last-kbd-macro) 0))
+ (setq last-kbd-macro nil)
(message "Ignore empty macro")
! ;; Don't call `kmacro-ring-empty-p' to avoid its messages.
! (while (and (null last-kbd-macro) kmacro-ring)
! (kmacro-pop-ring1)))))
;;;###autoload