diff options
author | Roland McGrath <roland@frob.com> | 2011-01-21 15:56:24 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-01-21 15:56:24 -0500 |
commit | 6e1dbaa90f509915b6282dc61a041e434e41cf29 (patch) | |
tree | 884672169d37d62e4d54a4efbcd8862c447c5820 | |
parent | 0f1f97caf2128c133ec7c7fae742d6334a912d1b (diff) | |
download | emacs-6e1dbaa90f509915b6282dc61a041e434e41cf29.tar.gz |
* lisp/comint.el (comint-replace-by-expanded-history-before-point): Fix
expansion of !$ and !!:N syntax to pick the indicated word.
Fixes: debbugs:7883
-rw-r--r-- | lisp/ChangeLog | 10 | ||||
-rw-r--r-- | lisp/comint.el | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 380c082d82e..f0c7bbf41e7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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> diff --git a/lisp/comint.el b/lisp/comint.el index 9de10aa6b01..e7c9c386098 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1292,7 +1292,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^$*-]+\\)?") |