[slime-cvs] CVS slime/contrib
CVS User trittweiler
trittweiler at common-lisp.net
Sat Oct 31 21:31:49 UTC 2009
Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv26979/contrib
Modified Files:
swank-arglists.lisp slime-autodoc.el ChangeLog
Log Message:
* slime-autodoc.el (slime-autodoc-worthwile-p): New helper.
(slime-compute-autodoc-internal): Use it to only perform an RPC
request if it's worthwhile to do so. For example, don't do it if
the user only typed a single opening parenthesis.
* swank-arglists.lisp (variable-desc-for-echo-area):
Bind *PRINT-READABLY* to NIL as global variables may contain
objects which can't be printed readably.
--- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2009/10/31 20:18:28 1.36
+++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2009/10/31 21:31:49 1.37
@@ -498,7 +498,8 @@
(let ((sym (parse-symbol variable-name)))
(if (and sym (boundp sym))
(let ((*print-pretty* t) (*print-level* 4)
- (*print-length* 10) (*print-lines* 1))
+ (*print-length* 10) (*print-lines* 1)
+ (*print-readably* nil))
(call/truncated-output-to-string
75 (lambda (s)
(format s "~A => ~S" sym (symbol-value sym)))))))))
--- /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2009/09/15 17:34:32 1.20
+++ /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2009/10/31 21:31:49 1.21
@@ -206,17 +206,25 @@
background everytime a new autodoc is computed. The hook is
applied to the result of `slime-enclosing-form-specs'.")
+(defun slime-autodoc-worthwhile-p (ops)
+ ;; Prevent an RPC call for when the user solely typed in an opening
+ ;; parenthesis.
+ (and (not (null ops))
+ (or (not (null (first ops)))
+ (slime-length> ops 1))))
+
(defun slime-compute-autodoc-internal ()
"Returns the cached arglist information as string, or nil.
If it's not in the cache, the cache will be updated asynchronously."
(multiple-value-bind (ops arg-indices points)
(slime-enclosing-form-specs)
- (run-hook-with-args 'slime-autodoc-hook ops arg-indices points)
- (multiple-value-bind (cache-key retrieve-form)
- (slime-compute-autodoc-rpc-form ops arg-indices points)
- (let ((cached (slime-get-cached-autodoc cache-key)))
- (if cached
- cached
+ (when (slime-autodoc-worthwhile-p ops)
+ (run-hook-with-args 'slime-autodoc-hook ops arg-indices points)
+ (multiple-value-bind (cache-key retrieve-form)
+ (slime-compute-autodoc-rpc-form ops arg-indices points)
+ (let ((cached (slime-get-cached-autodoc cache-key)))
+ (if cached
+ cached
;; If nothing is in the cache, we first decline, and fetch
;; the arglist information asynchronously.
(prog1 nil
@@ -227,7 +235,7 @@
;; Now that we've got our information, get it to
;; the user ASAP.
(eldoc-message doc)
- (slime-store-into-autodoc-cache cache-key doc)))))))))))
+ (slime-store-into-autodoc-cache cache-key doc))))))))))))
(defun slime-compute-autodoc ()
(save-excursion
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/10/31 20:18:28 1.264
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/10/31 21:31:49 1.265
@@ -1,5 +1,16 @@
2009-10-31 Tobias C. Rittweiler <tcr at freebits.de>
+ * slime-autodoc.el (slime-autodoc-worthwile-p): New helper.
+ (slime-compute-autodoc-internal): Use it to only perform an RPC
+ request if it's worthwhile to do so. For example, don't do it if
+ the user only typed a single opening parenthesis.
+
+ * swank-arglists.lisp (variable-desc-for-echo-area):
+ Bind *PRINT-READABLY* to NIL as global variables may contain
+ objects which can't be printed readably.
+
+2009-10-31 Tobias C. Rittweiler <tcr at freebits.de>
+
* swank-c-p-c.lisp (completion-set): Split into
`symbol-completion-set', and `package-completion-set'.
(completions): Updated accordingly. Also: complete packages
More information about the slime-cvs
mailing list