aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/kmacro.el
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2004-11-01 23:06:32 +0000
committerKim F. Storm <[email protected]>2004-11-01 23:06:32 +0000
commit1b25dccd6ef4ffd0d82daf82143d2107cc5099e1 (patch)
tree3706fb3425d4f9edf6c85e05dd88f581ce002bc8 /lisp/kmacro.el
parent8a7644e9fd9ee9006ae2ea9142a11072ebb53808 (diff)
(group kmacro): Add :version.
(kmacro-keyboard-quit): New function to cleanup on C-g. (kmacro-start-macro): Set defining-kbd-macro to append when appending to last macro.
Diffstat (limited to 'lisp/kmacro.el')
-rw-r--r--lisp/kmacro.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 2b4cbcaf32..9ee34a8432 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -1,6 +1,6 @@
;;; kmacro.el --- enhanced keyboard macros
-;; Copyright (C) 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Kim F. Storm <[email protected]>
;; Keywords: keyboard convenience
@@ -120,6 +120,7 @@
"Simplified keyboard macro user interface."
:group 'keyboard
:group 'convenience
+ :version "21.4"
:link '(emacs-commentary-link :tag "Commentary" "kmacro.el")
:link '(emacs-library-link :tag "Lisp File" "kmacro.el"))
@@ -222,6 +223,14 @@ macro to be executed before appending to it."
(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,7 +594,9 @@ Use \\[kmacro-bind-to-key] to bind it to a key sequence."
(and append
(if kmacro-execute-before-append
(> (car arg) 4)
- (= (car arg) 4)))))))
+ (= (car arg) 4))))
+ (if (and defining-kbd-macro append)
+ (setq defining-kbd-macro 'append)))))
;;;###autoload