org-contacts: check that completion-at-point-functions is bound
This commit is contained in:
parent
4f5c58197e
commit
4d5b508f0f
1 changed files with 6 additions and 5 deletions
|
@ -224,11 +224,6 @@ If both match values are nil, return all contacts."
|
||||||
(when (mail-abbrev-in-expansion-header-p)
|
(when (mail-abbrev-in-expansion-header-p)
|
||||||
(org-contacts-complete-name))))
|
(org-contacts-complete-name))))
|
||||||
|
|
||||||
(add-hook 'message-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
(add-to-list 'completion-at-point-functions
|
|
||||||
'org-contacts-message-complete-function)))
|
|
||||||
|
|
||||||
(defun org-contacts-gnus-get-name-email ()
|
(defun org-contacts-gnus-get-name-email ()
|
||||||
"Get name and email address from Gnus message."
|
"Get name and email address from Gnus message."
|
||||||
(gnus-with-article-headers
|
(gnus-with-article-headers
|
||||||
|
@ -403,6 +398,12 @@ This adds `org-contacts-gnus-check-mail-address' and
|
||||||
(add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-check-mail-address)
|
(add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-check-mail-address)
|
||||||
(add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-store-last-mail))
|
(add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-store-last-mail))
|
||||||
|
|
||||||
|
(when (boundp 'completion-at-point-functions)
|
||||||
|
(add-hook 'message-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(add-to-list 'completion-at-point-functions
|
||||||
|
'org-contacts-message-complete-function))))
|
||||||
|
|
||||||
(defun org-contacts-wl-get-from-header-content ()
|
(defun org-contacts-wl-get-from-header-content ()
|
||||||
"Retrieve the content of the `From' header of an email.
|
"Retrieve the content of the `From' header of an email.
|
||||||
Works from wl-summary-mode and mime-view-mode - that is while viewing email.
|
Works from wl-summary-mode and mime-view-mode - that is while viewing email.
|
||||||
|
|
Loading…
Reference in a new issue