summaryrefslogtreecommitdiffstats
path: root/lisp/ravi-init-python.el
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2015-09-01 05:16:04 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2015-09-01 05:16:04 (GMT)
commit01661ece4c9e20cd85527e77c76ce747d1330ca6 (patch)
tree959702704526feb8fb3d4fa94ab374925488fd42 /lisp/ravi-init-python.el
parent0156bb35d17d7d0b9c7228a14e755f7bdd5058a8 (diff)
downloaddotemacs-01661ece4c9e20cd85527e77c76ce747d1330ca6.zip
dotemacs-01661ece4c9e20cd85527e77c76ce747d1330ca6.tar.gz
dotemacs-01661ece4c9e20cd85527e77c76ce747d1330ca6.tar.bz2
Please remove tooltips after a while, please
Diffstat (limited to 'lisp/ravi-init-python.el')
-rw-r--r--lisp/ravi-init-python.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/ravi-init-python.el b/lisp/ravi-init-python.el
index ba37dc6..7993092 100644
--- a/lisp/ravi-init-python.el
+++ b/lisp/ravi-init-python.el
@@ -103,6 +103,21 @@
basic-server-args))
(jedi:setup)))
+ ;; Override pos-tip support to automatically delete tooltip
+ (defun ravi/jedi:tooltip-show (string)
+ (cond
+ ((and (memq 'pos-tip jedi:tooltip-method) window-system
+ (featurep 'pos-tip))
+ (pos-tip-show (jedi:string-fill-paragraph string)
+ 'popup-tip-face nil nil 5))
+ ((and (memq 'popup jedi:tooltip-method)
+ (featurep 'popup))
+ (popup-tip string))
+ (t (when (stringp string)
+ (let ((message-log-max nil))
+ (message string))))))
+ (fset 'jedi:tooltip-show 'ravi/jedi:tooltip-show)
+
(defun ravi/python-jedi-hook-installer ()
;; (setq jedi:complete-on-dot t) ; needs auto-complete
(add-hook 'hack-local-variables-hook 'ravi/jedi-setup nil t))