- (prefix (and (derived-mode-p 'message-mode)
- (looking-back (concat notmuch-address-completion-headers-regexp ".*")
- (line-beginning-position))
- (setq notmuch-company-last-prefix (company-grab "[:,][ \t]*\\(.*\\)" 1 (point-at-bol)))))
+ (prefix (and (or (derived-mode-p 'message-mode)
+ (derived-mode-p 'org-msg-edit-mode))
+ (looking-back
+ (concat notmuch-address-completion-headers-regexp ".*")
+ (line-beginning-position))
+ (setq notmuch-company-last-prefix
+ (company-grab "[:,][ \t]*\\(.*\\)" 1 (point-at-bol)))))