]> code.delx.au - gnu-emacs/blobdiff - lisp/comint.el
Merge from emacs-23
[gnu-emacs] / lisp / comint.el
index da722002c207acd22f66b558db1ead7f27599298..1912cdcfc44d739ee525e906220b5923ac4d9162 100644 (file)
@@ -1294,7 +1294,9 @@ than the logical beginning of line."
                   (message "Relative reference exceeds input history size"))))
              ((or (looking-at "!!?:?\\([0-9^$*-]+\\)") (looking-at "!!"))
               ;; Just a number of args from the previous input line.
-              (replace-match (comint-previous-input-string 0) t t)
+              (replace-match (comint-args (comint-previous-input-string 0)
+                                          (match-beginning 1) (match-end 1))
+                             t t)
               (message "History item: previous"))
              ((looking-at
                "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?")