[slime-cvs] CVS slime/contrib
CVS User trittweiler
trittweiler at common-lisp.net
Sun Jan 3 16:54:40 UTC 2010
Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv29834/contrib
Modified Files:
ChangeLog slime-autodoc.el
Log Message:
* slime-autodoc.el (slime-autodoc): Renamed from
`slime-compute-autodoc'; now also interactive.
(slime-autodoc-mode): Implement toggling properly. Make modeline
string "Autodoc" rather than "Eldoc".
(slime-autodoc-maybe-enable): Adapted accordingly.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/01/03 15:58:29 1.329
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/01/03 16:54:40 1.330
@@ -1,3 +1,11 @@
+2010-01-03 Tobias C. Rittweiler <tcr at freebits.de>
+
+ * slime-autodoc.el (slime-autodoc): Renamed from
+ `slime-compute-autodoc'; now also interactive.
+ (slime-autodoc-mode): Implement toggling properly. Make modeline
+ string "Autodoc" rather than "Eldoc".
+ (slime-autodoc-maybe-enable): Adapted accordingly.
+
2010-01-03 Stas Boukarev <stassats at gmail.com>
* slime-repl.el (sldb-insert-frame-call-to-repl): New function
--- /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2010/01/03 15:34:54 1.29
+++ /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2010/01/03 16:54:40 1.30
@@ -154,9 +154,10 @@
;;;; slime-autodoc-mode
-(defun slime-compute-autodoc ()
+(defun slime-autodoc ()
"Returns the cached arglist information as string, or nil.
If it's not in the cache, the cache will be updated asynchronously."
+ (interactive)
(save-excursion
;; Save match data just in case. This is automatically run in
;; background, so it'd be rather disastrous if it touched match
@@ -185,19 +186,16 @@
(make-variable-buffer-local (defvar slime-autodoc-mode nil))
(defun slime-autodoc-mode (&optional arg)
- (interactive "P")
+ (interactive (list (or current-prefix-arg 'toggle)))
(make-local-variable 'eldoc-documentation-function)
(make-local-variable 'eldoc-idle-delay)
- (setq eldoc-documentation-function 'slime-compute-autodoc)
+ (make-local-variable 'eldoc-minor-mode-string)
+ (setq eldoc-documentation-function 'slime-autodoc)
(setq eldoc-idle-delay slime-autodoc-delay)
- (eldoc-mode arg)
- (cond (eldoc-mode
- (setq slime-echo-arglist-function
- (lambda () (eldoc-message (slime-compute-autodoc))))
- (setq slime-autodoc-mode t))
- (t
- (setq slime-echo-arglist-function 'slime-show-arglist)
- (setq slime-autodoc-mode nil))))
+ (setq eldoc-minor-mode-string " Autodoc")
+ (setq slime-autodoc-mode (eldoc-mode arg))
+ (message (format "Slime autodoc mode %s"
+ (if slime-autodoc-mode "enabled" "disabled"))))
(defadvice eldoc-display-message-no-interference-p
(after slime-autodoc-message-ok-p)
@@ -220,8 +218,13 @@
(add-hook h 'slime-autodoc-maybe-enable)))
(defun slime-autodoc-maybe-enable ()
- (when slime-use-autodoc-mode
- (slime-autodoc-mode 1)))
+ (when slime-use-autodoc-mode
+ (slime-autodoc-mode 1)
+ (setq slime-echo-arglist-function
+ (lambda ()
+ (if slime-autodoc-mode
+ (eldoc-message (slime-autodoc))
+ (slime-show-arglist))))))
;;; FIXME: This doesn't disable eldoc-mode in existing buffers.
(defun slime-autodoc-unload ()
@@ -231,8 +234,6 @@
(slime-require :swank-arglists)
-
-
;;;; Test cases
(defun slime-check-autodoc-at-point (arglist)
More information about the slime-cvs
mailing list