X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;h=481abd7c3ba1df6db86d532817b67c64a802f0d9;hp=00cd9808c1141f8e6ae470eaa63f2482652bfa5d;hb=957fc2e1a7d00636c7eaaf487edae65e7a63dc8f;hpb=4eb151e26ce06f8889c6b1ca43ca79f7bfdab26d diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 00cd9808..481abd7c 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -287,6 +287,19 @@ the From: header is already filled in by notmuch." (defvar notmuch-mua-sender-history nil) +;; Workaround: Running `ido-completing-read' in emacs 23.1, 23.2 and 23.3 +;; without some explicit initialization fill freeze the operation. +;; Hence, we advice `ido-completing-read' to ensure required initialization +;; is done. +(if (and (= emacs-major-version 23) (< emacs-minor-version 4)) + (defadvice ido-completing-read (before notmuch-ido-mode-init activate) + (ido-init-completion-maps) + (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) + (add-hook 'choose-completion-string-functions + 'ido-choose-completion-string) + (ad-disable-advice 'ido-completing-read 'before 'notmuch-ido-mode-init) + (ad-activate 'ido-completing-read))) + (defun notmuch-mua-prompt-for-sender () (interactive) (let (name addresses one-name-only)