From e008b78afc5fc2b85f6d84188bafb3b5ee86e2fb Mon Sep 17 00:00:00 2001 From: stardiviner Date: Sat, 26 Aug 2017 19:34:23 +0800 Subject: [PATCH] disable eldoc-overlay-mode in org-mode. --- eldoc-overlay-mode.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eldoc-overlay-mode.el b/eldoc-overlay-mode.el index 3707552..67451f3 100644 --- a/eldoc-overlay-mode.el +++ b/eldoc-overlay-mode.el @@ -18,9 +18,13 @@ (let ((map (make-sparse-keymap))) map)) -(defcustom eldoc-overlay-mode-function 'inline-docs +(defcustom eldoc-overlay-function 'inline-docs "Specify the function for displaying eldoc. -Two functions currently supported: `inline-docs', and `quick-peek-show'.") +Two functions currently supported: `inline-docs', and `eldoc-overlay-mode-quick-peek'.") + +(defun eldoc-overlay-disable-in-org-mode () + (setq-local eldoc-message-function #'eldoc-minibuffer-message)) + ;;;###autoload (define-minor-mode eldoc-overlay-mode @@ -30,7 +34,9 @@ Two functions currently supported: `inline-docs', and `quick-peek-show'.") :keymap eldoc-overlay-mode-map :global t (if eldoc-overlay-mode - (setq eldoc-message-function eldoc-overlay-mode-function) + (progn + (setq eldoc-message-function eldoc-overlay-function) + (add-hook 'org-mode-hook #'eldoc-overlay-disable-in-org-mode)) (setq eldoc-message-function #'eldoc-minibuffer-message) ) ) -- 2.11.4.GIT