[slime-devel] slime-message fixes
Thomas F. Burdick
tfb at OCF.Berkeley.EDU
Mon Oct 11 02:25:04 UTC 2004
Using Carbon Emacs, slime-message currently uses message, which only
shows up to 7 lines. Similarly, slime-display-message doesn't
necessarily show all of the message, either. For me, this means
truncated displays of compiler notes :-(
The following patch fixes slime-message to show the entirety of a
message, at least on my system.
Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.408
diff -u -F^(def -r1.408 slime.el
--- slime.el 3 Oct 2004 12:56:10 -0000 1.408
+++ slime.el 11 Oct 2004 02:24:33 -0000
@@ -917,10 +917,12 @@ (defun slime-message (format &rest args)
other Emacsen they use the \"typeout frame\" if it is active,
otherwise a temporary window that is automatically dismissed before
the next command."
- (if (or (featurep 'xemacs)
- (= emacs-major-version 20))
- (slime-display-message (apply #'format format args) "*SLIME Note*")
- (apply 'message format args)))
+ (let ((message (apply #'format format args)))
+ (if (or (featurep 'xemacs)
+ (= emacs-major-version 20)
+ (> (count ?\n message) 6))
+ (slime-display-message message "*SLIME Note*")
+ (message "%s" message))))
(defun slime-display-message (message buffer-name)
"Display MESSAGE in the echo area or in BUFFER-NAME.
@@ -940,8 +942,7 @@ (defun slime-display-message (message bu
(goto-char (point-min))
(let ((win (slime-create-message-window)))
(set-window-buffer win (current-buffer))
- (shrink-window-if-larger-than-buffer
- (display-buffer (current-buffer)))))
+ (fit-window-to-buffer (display-buffer (current-buffer)))))
(push (lambda () (delete-windows-on buffer) (bury-buffer buffer))
slime-pre-command-actions))))
(t (message "%s" message))))
More information about the slime-devel
mailing list