]> code.delx.au - gnu-emacs/blobdiff - lisp/kmacro.el
Merge Org 7.9.3 (commit 31c1aea)
[gnu-emacs] / lisp / kmacro.el
index ffc97085a694862b2babddf9a85849a8f62dd439..d573bd0239783ebaa401aa68cb43ef5f2eefead3 100644 (file)
@@ -1,6 +1,6 @@
 ;;; kmacro.el --- enhanced keyboard macros
 
-;; Copyright (C) 2002-201 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2013 Free Software Foundation, Inc.
 
 ;; Author: Kim F. Storm <storm@cua.dk>
 ;; Keywords: keyboard convenience
@@ -629,8 +629,7 @@ 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))
-       repeat-key-str)
+                        last-input-event)))
     (if end-macro
        (kmacro-end-macro arg)
       (call-last-kbd-macro arg #'kmacro-loop-setup-function))
@@ -641,7 +640,13 @@ others, use \\[kmacro-name-last-macro]."
                     (if (eq kmacro-call-repeat-key t)
                         repeat-key
                       kmacro-call-repeat-key)))
-      (setq repeat-key-str (format-kbd-macro (vector repeat-key) nil))
+      ;; Issue a hint to the user, if the echo area isn't in use.
+      (unless (current-message)
+       (message "(Type %s to repeat macro%s)"
+                (format-kbd-macro (vector repeat-key) nil)
+                (if (and kmacro-call-repeat-with-arg
+                         arg (> arg 1))
+                    (format " %d times" arg) "")))
       ;; Can't use the `keep-pred' arg because this overlay keymap needs to be
       ;; removed during the next run of the kmacro (i.e. we need to add&remove
       ;; this overlay-map at each repetition).