]> code.delx.au - gnu-emacs/commitdiff
* etc/NEWS: Mention `kmacro-to-register' and new eldoc feature.
authorLeo Liu <sdl.web@gmail.com>
Sat, 30 Mar 2013 13:49:00 +0000 (21:49 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sat, 30 Mar 2013 13:49:00 +0000 (21:49 +0800)
* 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.

etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/kmacro.el

index 1910a3736d2778963014692e00032d1d42cdc725..92f31e6c6e800ed2afb7f078f4db3765293c5509 100644 (file)
@@ -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
index 06a5db2b1bd2e7d4d44716449e9c4e8892072cf8..1d416dd3737e72956fefce5fe7fce1e0f23d9873 100644 (file)
--- 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.
+
 \f
 * 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.
index 781c5994e3ad70d6999afc68213ba1a8a851458a..26739a286e3a100231b9a3f0601b3890aea900de 100644 (file)
@@ -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'.
index 4253fb87d5cb89697a2110621cfb31087554848e..c08f49df0a75cfda9abbe8b071fae528f4ec4b51 100644 (file)
@@ -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)