]> git.eshelyaron.com Git - emacs.git/commitdiff
Small fix for he-line-search-regexp
authorGlenn Morris <rgm@gnu.org>
Fri, 23 May 2014 18:14:24 +0000 (14:14 -0400)
committerGlenn Morris <rgm@gnu.org>
Fri, 23 May 2014 18:14:24 +0000 (14:14 -0400)
* lisp/hippie-exp.el (he-line-search-regexp):
Handle comint-prompt-regexp containing subgroups.

Fixes: debbugs:17529
lisp/ChangeLog
lisp/hippie-exp.el

index 1d450e3d5d5a917105a188ead2fc99cc18c3c926..c142daeee7f58f2da64f49754c4e4a81760ffeca 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-23  Glenn Morris  <rgm@gnu.org>
+
+       * hippie-exp.el (he-line-search-regexp):
+       Handle comint-prompt-regexp containing subgroups.  (Bug#17529)
+
 2014-05-23  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: Remove dependence on auto-mode-alist,
index 51c8c3c3d7e46a8196d45e2d96d535b688e234fa..d3b8a2cf6c5da1f78ddc8fc172bd99d8f8a689ce 100644 (file)
@@ -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-*\\)\\("