Commit 0b1619da authored by Leo Liu's avatar Leo Liu

* etc/NEWS: Mention `kmacro-to-register' and new eldoc feature.

* lisp/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.
parent 7c5ef69a
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> 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 * NEWS: Added entry for em-tramp change in 2013-03-26T22:08:58Z!aidalgol@no8wireless.co.nz
......
...@@ -82,6 +82,8 @@ bound to <f11> and M-<f10>, respectively. ...@@ -82,6 +82,8 @@ bound to <f11> and M-<f10>, respectively.
** In keymaps where SPC scrolls, S-SPC now scrolls in the reverse direction. ** In keymaps where SPC scrolls, S-SPC now scrolls in the reverse direction.
Eg View mode, etc. 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 * Changes in Specialized Modes and Packages in Emacs 24.4
...@@ -111,6 +113,8 @@ Affected files: ...@@ -111,6 +113,8 @@ Affected files:
use `electric-indent-mode' instead. use `electric-indent-mode' instead.
*** `delphi-tab' is gone, replaced by `indent-for-tab-command'. *** `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. ** 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. ** 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> 2013-03-30 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/subword.el: Back to using `forward-symbol'. * progmodes/subword.el: Back to using `forward-symbol'.
......
...@@ -614,9 +614,10 @@ An argument of zero means repeat until error." ...@@ -614,9 +614,10 @@ An argument of zero means repeat until error."
;;;###autoload ;;;###autoload
(defun kmacro-call-macro (arg &optional no-repeat end-macro) (defun kmacro-call-macro (arg &optional no-repeat end-macro macro)
"Call the last keyboard macro that you defined with \\[kmacro-start-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. 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 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 just the last key in the key sequence that you used to call this
...@@ -630,7 +631,8 @@ others, use \\[kmacro-name-last-macro]." ...@@ -630,7 +631,8 @@ others, use \\[kmacro-name-last-macro]."
(> (length (this-single-command-keys)) 1)) (> (length (this-single-command-keys)) 1))
;; Used when we're in the process of repeating. ;; Used when we're in the process of repeating.
(eq no-repeat 'repeating)) (eq no-repeat 'repeating))
last-input-event))) last-input-event))
(last-kbd-macro (or macro last-kbd-macro)))
(if end-macro (if end-macro
(kmacro-end-macro arg) (kmacro-end-macro arg)
(call-last-kbd-macro arg #'kmacro-loop-setup-function)) (call-last-kbd-macro arg #'kmacro-loop-setup-function))
...@@ -656,7 +658,7 @@ others, use \\[kmacro-name-last-macro]." ...@@ -656,7 +658,7 @@ others, use \\[kmacro-name-last-macro]."
(define-key map (vector repeat-key) (define-key map (vector repeat-key)
`(lambda () (interactive) `(lambda () (interactive)
(kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg) (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg)
'repeating))) 'repeating nil ,last-kbd-macro)))
map))))) map)))))
...@@ -838,8 +840,7 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command ...@@ -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) (defun kmacro-execute-from-register (k)
(let ((last-kbd-macro k)) (kmacro-call-macro current-prefix-arg nil nil k))
(kmacro-call-macro current-prefix-arg)))
(defun kmacro-to-register (r) (defun kmacro-to-register (r)
"Store the last keyboard macro in 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 ...@@ -851,10 +852,10 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
last-kbd-macro last-kbd-macro
:jump-func 'kmacro-execute-from-register :jump-func 'kmacro-execute-from-register
:print-func (lambda (k) :print-func (lambda (k)
(princ (format "a keyboard macro:\n %s" (princ (format "a keyboard macro:\n %s"
(format-kbd-macro k)))) (format-kbd-macro k))))
:insert-func (lambda (k) :insert-func (lambda (k)
(insert (format-kbd-macro k)))))) (insert (format-kbd-macro k))))))
(defun kmacro-view-macro (&optional _arg) (defun kmacro-view-macro (&optional _arg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment