summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Jadi <gregoire.jadi@gmail.com>2013-02-27 12:41:08 +0100
committerGrégoire Jadi <gregoire.jadi@gmail.com>2013-02-27 13:28:13 +0100
commitaecccc10d06ce28ebcd68c2278b845c427d79e9d (patch)
tree23cdca194de8ec3a301c20aaca4bb5ce7be7c291
parente4cebbe40eb6ec87314267079fd672f8c5bb115d (diff)
downloadorg-mode-aecccc10d06ce28ebcd68c2278b845c427d79e9d.tar.gz
org-contacts.el: Let the users decide if they want to use `org-contacts' to complete mail addresses
* contrib/lisp/org-contacts.el (org-contacts-enable-completion): A custom boolean variable to enable the completion with `org-contacts'. Enabled by default.
-rw-r--r--contrib/lisp/org-contacts.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index f99242c..8674533 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -133,6 +133,11 @@ This overrides `org-email-link-description-format' if set."
:group 'org-contacts
:type 'file)
+(defcustom org-contacts-enable-completion t
+ "Enable or not the completion in `message-mode' with `org-contacts'."
+ :group 'org-contacts
+ :type 'boolean)
+
;; Decalre external functions and variables
(declare-function wl-summary-message-number "ext:wl-summary" ())
(declare-function wl-address-header-extract-address "ext:wl-address")
@@ -642,7 +647,8 @@ 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-store-last-mail))
-(when (boundp 'completion-at-point-functions)
+(when (and org-contacts-enable-completion
+ (boundp 'completion-at-point-functions))
(add-hook 'message-mode-hook
(lambda ()
(add-to-list 'completion-at-point-functions