[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another bug with the macro counter
From: |
Kim F. Storm |
Subject: |
Re: Another bug with the macro counter |
Date: |
Mon, 01 Nov 2004 00:23:18 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Luc Teirlinck <address@hidden> writes:
> The second one is that I would rename kmacro-appending-p to
> kmacro-appending-flag.
Of course! But it would be better to get rid of the flag
completely.
Below you find a patch sets defining-kbd-macro to 'append' when appending.
> Unlike in the first case, the user can not but notice
> what happened and hence can remove the macro with C-x C-k C-d. This
> situation remains unchanged after either your or my patch.
Maybe this is ok -- it also gives him the chance to edit it with C-x C-k SPC.
> If this
> situation happens while appending to a keyboard macro, then
> kmacro-appending-p will remain t, even though no macro is being defined.
> I could give a concrete example if desired.
I suppose that defining-kbd-macro is set to nil in those cases,
so my patch fixes that part...
I think the patch is ready now -- should I install it?
*** kmacro.el 19 Oct 2004 12:54:29 +0200 1.23
--- kmacro.el 01 Nov 2004 00:05:58 +0100
***************
*** 222,227 ****
--- 222,237 ----
(global-set-key (vector kmacro-call-mouse-event) 'kmacro-end-call-mouse))
+ ;;; Called from keyboard-quit
+
+ (defun kmacro-keyboard-quit ()
+ (or (not defining-kbd-macro)
+ (eq defining-kbd-macro 'append)
+ (kmacro-ring-empty-p)
+ (kmacro-pop-ring)))
;;; Keyboard macro counter
***************
*** 585,591 ****
(and append
(if kmacro-execute-before-append
(> (car arg) 4)
! (= (car arg) 4)))))))
;;;###autoload
--- 595,603 ----
(and append
(if kmacro-execute-before-append
(> (car arg) 4)
! (= (car arg) 4))))
! (if (and defining-kbd-macro append)
! (setq defining-kbd-macro 'append)))))
*** simple.el 25 Oct 2004 10:45:18 +0200 1.664
--- simple.el 01 Nov 2004 00:18:07 +0100
***************
*** 3916,3921 ****
--- 3916,3923 ----
At top-level, as an editor command, this simply beeps."
(interactive)
(deactivate-mark)
+ (if (fboundp 'kmacro-keyboard-quit)
+ (kmacro-keyboard-quit))
(setq defining-kbd-macro nil)
(signal 'quit nil))
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: Another bug with the macro counter, (continued)
- Re: Another bug with the macro counter, Luc Teirlinck, 2004/10/30
- Re: Another bug with the macro counter, Luc Teirlinck, 2004/10/30
- Re: Another bug with the macro counter, Kim F. Storm, 2004/10/30
- Re: Another bug with the macro counter, Luc Teirlinck, 2004/10/30
- Re: Another bug with the macro counter, Luc Teirlinck, 2004/10/30
- Re: Another bug with the macro counter, Kim F. Storm, 2004/10/30
- Re: Another bug with the macro counter, Luc Teirlinck, 2004/10/31
- Re: Another bug with the macro counter,
Kim F. Storm <=
- Re: Another bug with the macro counter, Richard Stallman, 2004/10/31