emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 31 Oct 2004 00:43:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

I think your patch is imcomplete (so is mine) --

we only want the kmacro cleanup to happen if we are
currently defining a macro, your patch does it always

Here is the correct function:

 (or (not defining-kbd-macro)
     appending-to-kbd-macro
     ;; Just for safety.  kmacro.el should be loaded if we got here.
     ;; Nothing else sets `appending-to-kbd-macro' to t.
     (not (featurep 'kmacro))
     (with-no-warnings (kmacro-ring-empty-p))
     (with-no-warnings (kmacro-pop-ring)))
 (setq appending-to-kbd-macro nil)
 (setq defining-kbd-macro nil)


In any case,  I still think my approach is cleaner and better.

Luc Teirlinck <address@hidden> writes:

> ***************
> *** 3916,3921 ****
> --- 3922,3933 ----
>   At top-level, as an editor command, this simply beeps."
>     (interactive)
>     (deactivate-mark)
> +   (or appending-to-kbd-macro
> +       ;; Just for safety.  kmacro.el should be loaded if we got here.
> +       ;; Nothing else sets `appending-to-kbd-macro' to t.
> +       (not (featurep 'kmacro))
> +       (with-no-warnings (kmacro-ring-empty-p))
> +       (with-no-warnings (kmacro-pop-ring)))
>     (setq defining-kbd-macro nil)
>     (signal 'quit nil))
>   
> ============================================================



-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]