summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-11-03 00:39:10 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-11-03 00:39:10 +0000
commit5b95556284173d0cebc3b1378166c207afb3c495 (patch)
tree17fd6f661a1e1bc04094a44bc1d16c2784123ad8 /lisp/comint.el
parent6292c59952a47bdf315223db70e31c9e4e11fbdc (diff)
downloademacs-5b95556284173d0cebc3b1378166c207afb3c495.tar.gz
* comint.el (comint-replace-by-expanded-history-before-point):
Replace !! with the previous input string literally (Bug#1795).
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el5
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index cd7c3f26654..5fd6d8f23a9 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1277,10 +1277,7 @@ 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-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^$*-]+\\)?")