Mercurial > emacs
changeset 57854:b017a1c31a53
(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.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 01 Nov 2004 23:03:40 +0000 |
parents | d50014ac219f |
children | c16b7c5144ed |
files | lisp/kmacro.el |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/kmacro.el Mon Nov 01 23:03:12 2004 +0000 +++ b/lisp/kmacro.el Mon Nov 01 23:03:40 2004 +0000 @@ -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 <storm@cua.dk> ;; 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 @@ (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 @@ (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