From: Glenn Morris Date: Fri, 23 May 2014 18:14:24 +0000 (-0400) Subject: Small fix for he-line-search-regexp X-Git-Tag: emacs-24.3.92~173 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=486eebacf33c4d0835279cdb009bc02c2d687e6c;p=emacs.git Small fix for he-line-search-regexp * lisp/hippie-exp.el (he-line-search-regexp): Handle comint-prompt-regexp containing subgroups. Fixes: debbugs:17529 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d450e3d5d5..c142daeee7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-05-23 Glenn Morris + + * hippie-exp.el (he-line-search-regexp): + Handle comint-prompt-regexp containing subgroups. (Bug#17529) + 2014-05-23 Stephen Berman * calendar/todo-mode.el: Remove dependence on auto-mode-alist, 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-*\\)\\("