[slime-cvs] CVS slime/contrib
heller
heller at common-lisp.net
Sun Jan 27 10:17:35 UTC 2008
Update of /project/slime/cvsroot/slime/contrib
In directory clnet:/tmp/cvs-serv4721
Modified Files:
ChangeLog slime-autodoc.el slime-typeout-frame.el
Log Message:
Make autodoc use the correct width of the typeout-window.
* slime-autodoc.el (slime-autodoc-dimensions-function): New
variable.
(slime-autodoc-message-dimensions): Use it.
* slime-typeout-frame.el (slime-typeout-autodoc-dimensions): New
function.
(slime-typeout-frame-init): Use it.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2008/01/27 10:13:07 1.81
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2008/01/27 10:17:34 1.82
@@ -1,5 +1,17 @@
2008-01-27 Helmut Eller <heller at common-lisp.net>
+ Make autodoc use the correct width of the typeout-window.
+
+ * slime-autodoc.el (slime-autodoc-dimensions-function): New
+ variable.
+ (slime-autodoc-message-dimensions): Use it.
+
+ * slime-typeout-frame.el (slime-typeout-autodoc-dimensions): New
+ function.
+ (slime-typeout-frame-init): Use it.
+
+2008-01-27 Helmut Eller <heller at common-lisp.net>
+
Use slime-require instead of a connected-hook.
* slime-autodoc.el (slime-autodoc-on-connect): Deleted.
--- /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2008/01/27 10:13:09 1.6
+++ /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2008/01/27 10:17:34 1.7
@@ -116,10 +116,14 @@
(setq slime-autodoc-last-message doc)
(message "%s" doc))
+(defvar slime-autodoc-dimensions-function nil)
+
(defun slime-autodoc-message-dimensions ()
"Return the available width and height for pretty printing autodoc
messages."
(cond
+ (slime-autodoc-dimensions-function
+ (funcall slime-autodoc-dimensions-function))
(slime-autodoc-use-multiline-p
;; Use the full width of the minibuffer;
;; minibuffer will grow vertically if necessary
--- /project/slime/cvsroot/slime/contrib/slime-typeout-frame.el 2007/10/01 11:50:06 1.5
+++ /project/slime/cvsroot/slime/contrib/slime-typeout-frame.el 2008/01/27 10:17:34 1.6
@@ -64,6 +64,12 @@
(setq slime-autodoc-last-message "")
(slime-typeout-message-aux "%s" doc))
+(defun slime-typeout-autodoc-dimensions ()
+ (cond ((slime-typeout-active-p)
+ (list (window-width slime-typeout-window) nil))
+ (t
+ (list 75 nil))))
+
;;; Initialization
@@ -74,7 +80,8 @@
(loop for (var value) in
'((slime-message-function slime-typeout-message)
(slime-background-message-function slime-typeout-message)
- (slime-autodoc-message-function slime-typeout-autodoc-message))
+ (slime-autodoc-message-function slime-typeout-autodoc-message)
+ (slime-autodoc-dimensions-function slime-typeout-autodoc-dimensions))
do (slime-typeout-frame-init-var var value)))
(defun slime-typeout-frame-init-var (var value)
@@ -86,6 +93,7 @@
(remove-hook 'slime-connected-hook 'slime-ensure-typeout-frame)
(loop for (var value) in slime-typeout-frame-unbind-stack
do (cond ((eq var 'slime-unbound) (makunbound var))
- (t (set var value)))))
+ (t (set var value))))
+ (setq slime-typeout-frame-unbind-stack nil))
(provide 'slime-typeout-frame)
More information about the slime-cvs
mailing list