From aff4b0b2de05fb069e8641f49930b051d068617a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Jadi?= Date: Tue, 12 Feb 2013 15:54:16 +0100 Subject: [PATCH] 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. --- contrib/lisp/org-contacts.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 7af8c356a..e3ec7c790 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) -- 2.11.4.GIT