]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix bbdb completion for multi-recipient messages
authorJan Tatarik <(none)>
Tue, 12 Jan 2016 12:38:38 +0000 (13:38 +0100)
committerJan Tatarik <(none)>
Tue, 12 Jan 2016 12:52:31 +0000 (13:52 +0100)
Trigger completion for the last incomplete recipient address only,
instead of the whole recipient list.

company-bbdb.el

index b83ce0f9db2d72224883e094b088573bc55dfbea..36307d0bc7dc25cef383df52016bfb53bd1be702 100644 (file)
@@ -1,6 +1,6 @@
 ;;; company-bbdb.el --- company-mode completion backend for BBDB in message-mode
 
-;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2014, 2016  Free Software Foundation, Inc.
 
 ;; Author: Jan Tatarik <jan.tatarik@gmail.com>
 
@@ -50,7 +50,7 @@
     (interactive (company-begin-backend 'company-bbdb))
     (prefix (and (memq major-mode company-bbdb-modes)
                  (featurep 'bbdb-com)
-                 (looking-back "^\\(To\\|Cc\\|Bcc\\): *\\(.*\\)"
+                 (looking-back "^\\(To\\|Cc\\|Bcc\\): *.*?\\([^,; ]*\\)"
                                (line-beginning-position))
                  (match-string-no-properties 2)))
     (candidates (company-bbdb--candidates arg))