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 /lisp/comint.el | |
parent | 0f1f97caf2128c133ec7c7fae742d6334a912d1b (diff) | |
download | emacs-6e1dbaa90f509915b6282dc61a041e434e41cf29.tar.gz emacs-6e1dbaa90f509915b6282dc61a041e434e41cf29.tar.bz2 emacs-6e1dbaa90f509915b6282dc61a041e434e41cf29.zip |
* lisp/comint.el (comint-replace-by-expanded-history-before-point): Fix
expansion of !$ and !!:N syntax to pick the indicated word.
Fixes: debbugs:7883
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 4 |
1 files changed, 3 insertions, 1 deletions
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^$*-]+\\)?") |