changeset 105828:3d8945f5688d

* comint.el (comint-replace-by-expanded-history-before-point): Replace !! with the previous input string literally (Bug#1795).
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 03 Nov 2009 00:39:10 +0000
parents f7bdaf5fffab
children 328150f0cf76
files lisp/ChangeLog lisp/comint.el
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Nov 02 02:59:23 2009 +0000
+++ b/lisp/ChangeLog	Tue Nov 03 00:39:10 2009 +0000
@@ -1,3 +1,8 @@
+2009-11-03  Chong Yidong  <cyd@stupidchicken.com>
+
+	* comint.el (comint-replace-by-expanded-history-before-point):
+	Replace !! with the previous input string literally (Bug#1795).
+
 2009-11-02  Jay Belanger  <jay.p.belanger@gmail.com>
 
 	* calc/calc-forms.el (calc-date-notation): Allow a "blank string"
--- a/lisp/comint.el	Mon Nov 02 02:59:23 2009 +0000
+++ b/lisp/comint.el	Tue Nov 03 00:39:10 2009 +0000
@@ -1277,10 +1277,7 @@
 		   (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-args (comint-previous-input-string 0)
-			     (match-beginning 1) (match-end 1))
-		t t)
+	       (replace-match (comint-previous-input-string 0) t t)
 	       (message "History item: previous"))
 	      ((looking-at
 		"!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?")