summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/kmacro.el19
4 files changed, 24 insertions, 9 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 1910a3736d2..92f31e6c6e8 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-30 Leo Liu <sdl.web@gmail.com>
+
+ * NEWS: Mention `kmacro-to-register' and new eldoc feature.
+
2013-03-29 Aidan Gauland <aidalgol@no8wireless.co.nz>
* NEWS: Added entry for em-tramp change in 2013-03-26T22:08:58Z!aidalgol@no8wireless.co.nz
diff --git a/etc/NEWS b/etc/NEWS
index 06a5db2b1bd..1d416dd3737 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -82,6 +82,8 @@ bound to <f11> and M-<f10>, respectively.
** In keymaps where SPC scrolls, S-SPC now scrolls in the reverse direction.
Eg View mode, etc.
+** New command `kmacro-to-register' to store keyboard macros in registers.
+
* Changes in Specialized Modes and Packages in Emacs 24.4
@@ -111,6 +113,8 @@ Affected files:
use `electric-indent-mode' instead.
*** `delphi-tab' is gone, replaced by `indent-for-tab-command'.
+** Eldoc Mode works properly in the minibuffer.
+
** jit-lock-debug-mode lets you use the debuggers on code run via jit-lock.
** completing-read-multiple's separator can now be a regexp.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 781c5994e3a..26739a286e3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-30 Leo Liu <sdl.web@gmail.com>
+
+ * kmacro.el (kmacro-call-macro): Add optional arg MACRO.
+ (kmacro-execute-from-register): Pass the keyboard macro to
+ kmacro-call-macro or repeating won't work correctly.
+
2013-03-30 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/subword.el: Back to using `forward-symbol'.
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 4253fb87d5c..c08f49df0a7 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -614,9 +614,10 @@ An argument of zero means repeat until error."
;;;###autoload
-(defun kmacro-call-macro (arg &optional no-repeat end-macro)
- "Call the last keyboard macro that you defined with \\[kmacro-start-macro].
+(defun kmacro-call-macro (arg &optional no-repeat end-macro macro)
+ "Call the keyboard MACRO that you defined with \\[kmacro-start-macro].
A prefix argument serves as a repeat count. Zero means repeat until error.
+MACRO defaults to `last-kbd-macro'.
When you call the macro, you can call the macro again by repeating
just the last key in the key sequence that you used to call this
@@ -630,7 +631,8 @@ others, use \\[kmacro-name-last-macro]."
(> (length (this-single-command-keys)) 1))
;; Used when we're in the process of repeating.
(eq no-repeat 'repeating))
- last-input-event)))
+ last-input-event))
+ (last-kbd-macro (or macro last-kbd-macro)))
(if end-macro
(kmacro-end-macro arg)
(call-last-kbd-macro arg #'kmacro-loop-setup-function))
@@ -656,7 +658,7 @@ others, use \\[kmacro-name-last-macro]."
(define-key map (vector repeat-key)
`(lambda () (interactive)
(kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg)
- 'repeating)))
+ 'repeating nil ,last-kbd-macro)))
map)))))
@@ -838,8 +840,7 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
(defun kmacro-execute-from-register (k)
- (let ((last-kbd-macro k))
- (kmacro-call-macro current-prefix-arg)))
+ (kmacro-call-macro current-prefix-arg nil nil k))
(defun kmacro-to-register (r)
"Store the last keyboard macro in register R."
@@ -851,10 +852,10 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
last-kbd-macro
:jump-func 'kmacro-execute-from-register
:print-func (lambda (k)
- (princ (format "a keyboard macro:\n %s"
- (format-kbd-macro k))))
+ (princ (format "a keyboard macro:\n %s"
+ (format-kbd-macro k))))
:insert-func (lambda (k)
- (insert (format-kbd-macro k))))))
+ (insert (format-kbd-macro k))))))
(defun kmacro-view-macro (&optional _arg)