From 5b95556284173d0cebc3b1378166c207afb3c495 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 3 Nov 2009 00:39:10 +0000 Subject: [PATCH] * comint.el (comint-replace-by-expanded-history-before-point): Replace !! with the previous input string literally (Bug#1795). --- lisp/ChangeLog | 5 +++++ lisp/comint.el | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8c718a424b..c635f6fc395 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-11-03 Chong Yidong + + * comint.el (comint-replace-by-expanded-history-before-point): + Replace !! with the previous input string literally (Bug#1795). + 2009-11-02 Jay Belanger * calc/calc-forms.el (calc-date-notation): Allow a "blank string" 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^$*-]+\\)?") -- 2.39.5