From: Dmitry Gutov Date: Fri, 7 Nov 2014 13:52:55 +0000 (+0200) Subject: company-bbdb: Use the whole line content after `: ' as prefix X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/e66f2c3d0d4af5b2ed99a329d4a1bcd203c00cd8?hp=e5627dd039761d53c92e213a4fc450bfa1f97f9f company-bbdb: Use the whole line content after `: ' as prefix --- diff --git a/company-bbdb.el b/company-bbdb.el index 22741a205..b2760b290 100644 --- a/company-bbdb.el +++ b/company-bbdb.el @@ -41,9 +41,9 @@ (interactive (company-begin-backend 'company-bbdb)) (prefix (and (eq major-mode 'message-mode) (featurep 'bbdb-com) - (looking-back "^\\(To\\|Cc\\|Bcc\\):.*" + (looking-back "^\\(To\\|Cc\\|Bcc\\): *\\(.*\\)" (line-beginning-position)) - (company-grab-symbol))) + (match-string-no-properties 2))) (candidates (company-bbdb--candidates arg)) (sorted t) (no-cache t)))