changeset 112421:36dcbf24a6f1

* lisp/comint.el (comint-replace-by-expanded-history-before-point): Fix expansion of !$ and !!:N syntax to pick the indicated word.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 21 Jan 2011 15:56:24 -0500
parents f7f90410cc52
children e99b4c7a3af4
files lisp/ChangeLog lisp/comint.el
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Jan 21 15:48:20 2011 -0500
+++ b/lisp/ChangeLog	Fri Jan 21 15:56:24 2011 -0500
@@ -1,11 +1,17 @@
+2011-01-21  Roland McGrath  <roland@frob.com>
+
+	* comint.el (comint-replace-by-expanded-history-before-point): Fix
+	expansion of !$ and !!:N syntax to pick the indicated word (bug#7883).
+
 2011-01-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* progmodes/js.el (js--regexp-literal): Count backslashes (bug#7882).
 
 2011-01-21  Jari Aalto  <jari.aalto@cante.net>
 
-	* emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): (bug#7705)
-	Assume foo(bar) is a manpage reference rather than some unquoted symbol.
+	* emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
+	Assume foo(bar) is a manpage reference rather than some unquoted
+	symbol (bug#7705).
 
 2011-01-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
--- a/lisp/comint.el	Fri Jan 21 15:48:20 2011 -0500
+++ b/lisp/comint.el	Fri Jan 21 15:56:24 2011 -0500
@@ -1292,7 +1292,9 @@
 		   (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^$*-]+\\)?")