X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/8a7644e9fd9ee9006ae2ea9142a11072ebb53808..1b25dccd6ef4ffd0d82daf82143d2107cc5099e1:/lisp/kmacro.el 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 ;; 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