summaryrefslogtreecommitdiff
path: root/lisp/hippie-exp.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-05-23 14:14:24 -0400
committerGlenn Morris <rgm@gnu.org>2014-05-23 14:14:24 -0400
commit486eebacf33c4d0835279cdb009bc02c2d687e6c (patch)
treea2ae78bc523ce4ddaf41fb25da73b742e373925b /lisp/hippie-exp.el
parent903204bb53d1c05a9726316134e145d8bd34664e (diff)
downloademacs-486eebacf33c4d0835279cdb009bc02c2d687e6c.tar.gz
Small fix for he-line-search-regexp
* lisp/hippie-exp.el (he-line-search-regexp): Handle comint-prompt-regexp containing subgroups. Fixes: debbugs:17529
Diffstat (limited to 'lisp/hippie-exp.el')
-rw-r--r--lisp/hippie-exp.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el
index 51c8c3c3d7e..d3b8a2cf6c5 100644
--- a/lisp/hippie-exp.el
+++ b/lisp/hippie-exp.el
@@ -715,7 +715,7 @@ string). It returns t if a new completion is found, nil otherwise."
(defun he-line-search-regexp (pat strip-prompt)
(if strip-prompt
- (concat "\\(" comint-prompt-regexp "\\|^\\s-*\\)\\("
+ (concat "\\(" comint-prompt-regexp "\\|^\\s-*\\)\\(?2:"
(regexp-quote pat)
"[^\n]*[^ \t\n]\\)")
(concat "^\\(\\s-*\\)\\("