summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Jadi <gregoire.jadi@gmail.com>2013-02-12 15:54:16 +0100
committerGrégoire Jadi <gregoire.jadi@gmail.com>2013-02-14 21:23:10 +0100
commitaff4b0b2de05fb069e8641f49930b051d068617a (patch)
treeb9cd4760f02a09a36ddaf24116982ace8d0cf5e6
parent5800920c992839216134add11f44ed234f093209 (diff)
downloadorg-mode-aff4b0b2de05fb069e8641f49930b051d068617a.tar.gz
Do not complete when it's not necessary
* contrib/lisp/org-contacts.el (org-contacts-message-complete-function): Remove `completion-in-region--postch' from `post-command-hook' because it doesn't (seem?) do anything really useful.
-rw-r--r--contrib/lisp/org-contacts.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 7af8c35..e3ec7c7 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -436,6 +436,9 @@ A group FOO is composed of contacts with the tag FOO."
(defun org-contacts-message-complete-function (&optional start)
"Function used in `completion-at-point-functions' in `message-mode'."
+ ;; Avoid to complete in `post-command-hook'.
+ (when completion-in-region-mode
+ (remove-hook 'post-command-hook #'completion-in-region--postch))
(let ((mail-abbrev-mode-regexp
"^\\(Resent-To\\|To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\|Disposition-Notification-To\\|Return-Receipt-To\\):"))
(when (mail-abbrev-in-expansion-header-p)