From: Dmitry Gutov Date: Wed, 9 Mar 2016 03:14:57 +0000 (+0200) Subject: company-grab-line: Make it work in ERC prompt X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/c357d5acf7f1cc685fd89b3dccb1d72e0f96886b?ds=sidebyside company-grab-line: Make it work in ERC prompt http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22953 --- diff --git a/company.el b/company.el index 20aedc834..2667b5143 100644 --- a/company.el +++ b/company.el @@ -833,7 +833,8 @@ means that `company-mode' is always turned on except in `message-mode' buffers." If EXPRESSION is non-nil, return the match string for the respective parenthesized expression in REGEXP. Matching is limited to the current line." - (company-grab regexp expression (point-at-bol))) + (let ((inhibit-field-text-motion t)) + (company-grab regexp expression (point-at-bol)))) (defun company-grab-symbol () "If point is at the end of a symbol, return it.