summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-28 03:39:28 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-28 03:39:28 +0100
commit2a582ee40aa77ff4d05baef3e2ea4449615cd93f (patch)
tree47995467447de529dee6f3ce122807692655b677 /elisp
parentef55123a1cb33f0d8e555060d66f508db51122f2 (diff)
downloadgeiser-chez-2a582ee40aa77ff4d05baef3e2ea4449615cd93f.tar.gz
geiser-chez-2a582ee40aa77ff4d05baef3e2ea4449615cd93f.tar.bz2
Avoiding autodoc interfering with an active minibuffer
A piece of eldoc advice shamelessly lifted from slime.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-autodoc.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 9d7bfe5..1befb74 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -216,6 +216,17 @@ displayed in the minibuffer."
(eldoc-mode geiser-autodoc-mode)
(message "Geiser Autodoc %s" (if geiser-autodoc-mode "enabled" "disabled")))
+(defadvice eldoc-display-message-no-interference-p
+ (after geiser-autodoc--message-ok-p)
+ (when geiser-autodoc-mode
+ (setq ad-return-value
+ (and ad-return-value
+ ;; Display arglist only when the minibuffer is
+ ;; inactive, e.g. not on `C-x C-f'. Lifted from slime.
+ (not (active-minibuffer-window)))))
+ ad-return-value)
+
+
(provide 'geiser-autodoc)
;;; geiser-autodoc.el ends here