** 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.
+
\f
* Changes in Specialized Modes and Packages in Emacs 24.4
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.
+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'.
;;;###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
(> (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))
(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)))))
(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."
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)