aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2013-03-30 21:49:00 +0800
committerLeo Liu2013-03-30 21:49:00 +0800
commit0b1619da55f7c2e958edd38684c9c30fa235059f (patch)
tree0a13917f591aa4fb56db146d49b9352a501e3d32
parent7c5ef69a98e3f282c116c56eb7b3fe22e5bd44ea (diff)
downloademacs-0b1619da55f7c2e958edd38684c9c30fa235059f.tar.gz
emacs-0b1619da55f7c2e958edd38684c9c30fa235059f.zip
* 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.
-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 @@
12013-03-30 Leo Liu <sdl.web@gmail.com>
2
3 * NEWS: Mention `kmacro-to-register' and new eldoc feature.
4
12013-03-29 Aidan Gauland <aidalgol@no8wireless.co.nz> 52013-03-29 Aidan Gauland <aidalgol@no8wireless.co.nz>
2 6
3 * NEWS: Added entry for em-tramp change in 2013-03-26T22:08:58Z!aidalgol@no8wireless.co.nz 7 * 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.
82** In keymaps where SPC scrolls, S-SPC now scrolls in the reverse direction. 82** In keymaps where SPC scrolls, S-SPC now scrolls in the reverse direction.
83Eg View mode, etc. 83Eg View mode, etc.
84 84
85** New command `kmacro-to-register' to store keyboard macros in registers.
86
85 87
86* Changes in Specialized Modes and Packages in Emacs 24.4 88* Changes in Specialized Modes and Packages in Emacs 24.4
87 89
@@ -111,6 +113,8 @@ Affected files:
111use `electric-indent-mode' instead. 113use `electric-indent-mode' instead.
112*** `delphi-tab' is gone, replaced by `indent-for-tab-command'. 114*** `delphi-tab' is gone, replaced by `indent-for-tab-command'.
113 115
116** Eldoc Mode works properly in the minibuffer.
117
114** jit-lock-debug-mode lets you use the debuggers on code run via jit-lock. 118** jit-lock-debug-mode lets you use the debuggers on code run via jit-lock.
115 119
116** completing-read-multiple's separator can now be a regexp. 120** 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 @@
12013-03-30 Leo Liu <sdl.web@gmail.com>
2
3 * kmacro.el (kmacro-call-macro): Add optional arg MACRO.
4 (kmacro-execute-from-register): Pass the keyboard macro to
5 kmacro-call-macro or repeating won't work correctly.
6
12013-03-30 Teodor Zlatanov <tzz@lifelogs.com> 72013-03-30 Teodor Zlatanov <tzz@lifelogs.com>
2 8
3 * progmodes/subword.el: Back to using `forward-symbol'. 9 * 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."
614 614
615 615
616;;;###autoload 616;;;###autoload
617(defun kmacro-call-macro (arg &optional no-repeat end-macro) 617(defun kmacro-call-macro (arg &optional no-repeat end-macro macro)
618 "Call the last keyboard macro that you defined with \\[kmacro-start-macro]. 618 "Call the keyboard MACRO that you defined with \\[kmacro-start-macro].
619A prefix argument serves as a repeat count. Zero means repeat until error. 619A prefix argument serves as a repeat count. Zero means repeat until error.
620MACRO defaults to `last-kbd-macro'.
620 621
621When you call the macro, you can call the macro again by repeating 622When you call the macro, you can call the macro again by repeating
622just the last key in the key sequence that you used to call this 623just the last key in the key sequence that you used to call this
@@ -630,7 +631,8 @@ others, use \\[kmacro-name-last-macro]."
630 (> (length (this-single-command-keys)) 1)) 631 (> (length (this-single-command-keys)) 1))
631 ;; Used when we're in the process of repeating. 632 ;; Used when we're in the process of repeating.
632 (eq no-repeat 'repeating)) 633 (eq no-repeat 'repeating))
633 last-input-event))) 634 last-input-event))
635 (last-kbd-macro (or macro last-kbd-macro)))
634 (if end-macro 636 (if end-macro
635 (kmacro-end-macro arg) 637 (kmacro-end-macro arg)
636 (call-last-kbd-macro arg #'kmacro-loop-setup-function)) 638 (call-last-kbd-macro arg #'kmacro-loop-setup-function))
@@ -656,7 +658,7 @@ others, use \\[kmacro-name-last-macro]."
656 (define-key map (vector repeat-key) 658 (define-key map (vector repeat-key)
657 `(lambda () (interactive) 659 `(lambda () (interactive)
658 (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg) 660 (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg)
659 'repeating))) 661 'repeating nil ,last-kbd-macro)))
660 map))))) 662 map)))))
661 663
662 664
@@ -838,8 +840,7 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
838 840
839 841
840(defun kmacro-execute-from-register (k) 842(defun kmacro-execute-from-register (k)
841 (let ((last-kbd-macro k)) 843 (kmacro-call-macro current-prefix-arg nil nil k))
842 (kmacro-call-macro current-prefix-arg)))
843 844
844(defun kmacro-to-register (r) 845(defun kmacro-to-register (r)
845 "Store the last keyboard macro in register R." 846 "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 last-kbd-macro 852 last-kbd-macro
852 :jump-func 'kmacro-execute-from-register 853 :jump-func 'kmacro-execute-from-register
853 :print-func (lambda (k) 854 :print-func (lambda (k)
854 (princ (format "a keyboard macro:\n %s" 855 (princ (format "a keyboard macro:\n %s"
855 (format-kbd-macro k)))) 856 (format-kbd-macro k))))
856 :insert-func (lambda (k) 857 :insert-func (lambda (k)
857 (insert (format-kbd-macro k)))))) 858 (insert (format-kbd-macro k))))))
858 859
859 860
860(defun kmacro-view-macro (&optional _arg) 861(defun kmacro-view-macro (&optional _arg)