]> code.delx.au - gnu-emacs/blobdiff - lisp/repeat.el
* mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
[gnu-emacs] / lisp / repeat.el
index e577c461bc50f4ec8cad01bf9d4e73108da7bda8..01defa666953e65150433ad537204c6adbe61c87 100644 (file)
@@ -1,6 +1,6 @@
 ;;; repeat.el --- convenient way to repeat the previous command  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2013 Free Software Foundation, Inc.
 
 ;; Author: Will Mengarini <seldon@eskimo.com>
 ;; Created: Mo 02 Mar 98
@@ -193,9 +193,9 @@ this function is always whether the value of `this-command' would've been
 ;;;###autoload
 (defun repeat (repeat-arg)
   "Repeat most recently executed command.
-With prefix arg, apply new prefix arg to that command; otherwise,
-use the prefix arg that was used before (if any).
-This command is like the `.' command in the vi editor.
+If REPEAT-ARG is non-nil (interactively, with a prefix argument),
+supply a prefix argument to that command.  Otherwise, give the
+command the same prefix argument it was given before, if any.
 
 If this command is invoked by a multi-character key sequence, it
 can then be repeated by repeating the final character of that
@@ -289,6 +289,10 @@ recently executed command not bound to an input event\"."
                  (interactive)
                  (let ((repeat-message-function fun))
                    (setq this-command 'repeat)
+                  ;; Beware: messing with `real-this-command' is *bad*, but we
+                  ;; need it so `last-repeatable-command' can be recognized
+                  ;; later (bug#12232).
+                   (setq real-this-command 'repeat)
                    (call-interactively 'repeat))))))
          map)))))