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: Luc Teirlinck
Subject: Re: Another bug with the macro counter
Date: Sat, 30 Oct 2004 09:51:23 -0500 (CDT)

Actually, I believe I can quite as well move the _real_ defvar of
`appending-to-kbd-macro' to simple.el:

===File ~/simple-diff-4=====================================
*** simple.el   25 Oct 2004 07:40:49 -0500      1.664
--- simple.el   30 Oct 2004 09:28:02 -0500      
***************
*** 857,862 ****
--- 857,865 ----
    :type 'boolean
    :version "21.1")
  
+ ;; Quiet the compiler.
+ (defvar edebug-active) 
+ 
  (defun eval-expression-print-format (value)
    "Format VALUE as a result of evaluated expression.
  Return a formatted string which is displayed in the echo area
***************
*** 3907,3912 ****
--- 3910,3918 ----
  ;Turned off because it makes dbx bomb out.
  (setq blink-paren-function 'blink-matching-open)
  
+ (defvar appending-to-kbd-macro nil
+   "Non-nil when appending to a keyboard macro definition.")
+ 
  ;; This executes C-g typed while Emacs is waiting for a command.
  ;; Quitting out of a program does not go through here;
  ;; that happens in the QUIT macro at the C code level.
***************
*** 3916,3921 ****
--- 3922,3933 ----
  At top-level, as an editor command, this simply beeps."
    (interactive)
    (deactivate-mark)
+   (or (not (featurep 'kmacro))
+       appending-to-kbd-macro
+       ;; never exits the or.
+       (setq appending-to-kbd-macro nil)
+       (with-no-warnings (kmacro-ring-empty-p))
+       (with-no-warnings (kmacro-pop-ring)))
    (setq defining-kbd-macro nil)
    (signal 'quit nil))
  
============================================================

===File ~/kmacro-diff-4=====================================
*** kmacro.el   11 Oct 2004 17:28:10 -0500      1.23
--- kmacro.el   30 Oct 2004 09:28:52 -0500      
***************
*** 564,569 ****
--- 564,570 ----
    (if (or defining-kbd-macro executing-kbd-macro)
        (message "Already defining keyboard macro.")
      (let ((append (and arg (listp arg))))
+       (setq appending-to-kbd-macro append)
        (unless append
        (if last-kbd-macro
            (let ((len (length kmacro-ring)))
============================================================




reply via email to

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