diff options
| author | Kim F. Storm | 2004-11-01 23:06:32 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-11-01 23:06:32 +0000 |
| commit | 1b25dccd6ef4ffd0d82daf82143d2107cc5099e1 (patch) | |
| tree | 3706fb3425d4f9edf6c85e05dd88f581ce002bc8 | |
| parent | 8a7644e9fd9ee9006ae2ea9142a11072ebb53808 (diff) | |
| download | emacs-1b25dccd6ef4ffd0d82daf82143d2107cc5099e1.tar.gz emacs-1b25dccd6ef4ffd0d82daf82143d2107cc5099e1.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/kmacro.el | 15 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b030c02c7c..82aec89b14b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2004-11-02 Kim F. Storm <storm@cua.dk> | 1 | 2004-11-02 Kim F. Storm <storm@cua.dk> |
| 2 | 2 | ||
| 3 | * descr-text.el (describe-text-properties): Don't err if called in | ||
| 4 | the *Help* buffer; output to *Help-2* buffer instead. | ||
| 5 | |||
| 3 | * kmacro.el (group kmacro): Add :version. | 6 | * kmacro.el (group kmacro): Add :version. |
| 4 | (kmacro-keyboard-quit): New function to cleanup on C-g. | 7 | (kmacro-keyboard-quit): New function to cleanup on C-g. |
| 5 | (kmacro-start-macro): Set defining-kbd-macro to append when | 8 | (kmacro-start-macro): Set defining-kbd-macro to append when |
diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 2b4cbcaf323..9ee34a8432c 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; kmacro.el --- enhanced keyboard macros | 1 | ;;; kmacro.el --- enhanced keyboard macros |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Kim F. Storm <storm@cua.dk> | 5 | ;; Author: Kim F. Storm <storm@cua.dk> |
| 6 | ;; Keywords: keyboard convenience | 6 | ;; Keywords: keyboard convenience |
| @@ -120,6 +120,7 @@ | |||
| 120 | "Simplified keyboard macro user interface." | 120 | "Simplified keyboard macro user interface." |
| 121 | :group 'keyboard | 121 | :group 'keyboard |
| 122 | :group 'convenience | 122 | :group 'convenience |
| 123 | :version "21.4" | ||
| 123 | :link '(emacs-commentary-link :tag "Commentary" "kmacro.el") | 124 | :link '(emacs-commentary-link :tag "Commentary" "kmacro.el") |
| 124 | :link '(emacs-library-link :tag "Lisp File" "kmacro.el")) | 125 | :link '(emacs-library-link :tag "Lisp File" "kmacro.el")) |
| 125 | 126 | ||
| @@ -222,6 +223,14 @@ macro to be executed before appending to it." | |||
| 222 | (global-set-key (vector kmacro-call-mouse-event) 'kmacro-end-call-mouse)) | 223 | (global-set-key (vector kmacro-call-mouse-event) 'kmacro-end-call-mouse)) |
| 223 | 224 | ||
| 224 | 225 | ||
| 226 | ;;; Called from keyboard-quit | ||
| 227 | |||
| 228 | (defun kmacro-keyboard-quit () | ||
| 229 | (or (not defining-kbd-macro) | ||
| 230 | (eq defining-kbd-macro 'append) | ||
| 231 | (kmacro-ring-empty-p) | ||
| 232 | (kmacro-pop-ring))) | ||
| 233 | |||
| 225 | 234 | ||
| 226 | ;;; Keyboard macro counter | 235 | ;;; Keyboard macro counter |
| 227 | 236 | ||
| @@ -585,7 +594,9 @@ Use \\[kmacro-bind-to-key] to bind it to a key sequence." | |||
| 585 | (and append | 594 | (and append |
| 586 | (if kmacro-execute-before-append | 595 | (if kmacro-execute-before-append |
| 587 | (> (car arg) 4) | 596 | (> (car arg) 4) |
| 588 | (= (car arg) 4))))))) | 597 | (= (car arg) 4)))) |
| 598 | (if (and defining-kbd-macro append) | ||
| 599 | (setq defining-kbd-macro 'append))))) | ||
| 589 | 600 | ||
| 590 | 601 | ||
| 591 | ;;;###autoload | 602 | ;;;###autoload |