[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Wed Oct 28 10:15:20 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv2663

Modified Files:
	ChangeLog slime.el 
Log Message:
* slime.el (slime-format-display-message, slime-display-message)
(slime-create-message-window): Deleted.  The trick with the
pre-command-hook doesn't work in XEmacs 21.5.  So use the standard
message function.  One day XEmacs will learn how to resize the
minibuffer, but until then we have to live with one-line messages.

--- /project/slime/cvsroot/slime/ChangeLog	2009/10/27 12:46:32	1.1890
+++ /project/slime/cvsroot/slime/ChangeLog	2009/10/28 10:15:20	1.1891
@@ -1,3 +1,11 @@
+2009-10-28  Helmut Eller  <heller at common-lisp.net>
+
+	* slime.el (slime-format-display-message, slime-display-message)
+	(slime-create-message-window): Deleted.  The trick with the
+	pre-command-hook doesn't work in XEmacs 21.5.  So use the standard
+	message function.  One day XEmacs will learn how to resize the
+	minibuffer, but until then we have to live with one-line messages.
+
 2009-10-27  Helmut Eller  <heller at common-lisp.net>
 
 	* slime.el: Fix some docstrings and comments.
--- /project/slime/cvsroot/slime/slime.el	2009/10/27 12:46:32	1.1237
+++ /project/slime/cvsroot/slime/slime.el	2009/10/28 10:15:20	1.1238
@@ -778,44 +778,6 @@
 (defun slime-display-warning (message &rest args)
   (display-warning '(slime warning) (apply #'format message args)))
 
-(when (or (featurep 'xemacs))
-  (setq slime-message-function 'slime-format-display-message))
-
-(defun slime-format-display-message (format &rest args)
-  (slime-display-message (apply #'format format args) "*SLIME Note*"))
-
-(defun slime-display-message (message buffer-name) 
-  "Display MESSAGE in the echo area or in BUFFER-NAME.
-Use the echo area if MESSAGE needs only a single line.  If the MESSAGE
-requires more than one line display it in BUFFER-NAME and add a hook
-to `slime-pre-command-actions' to remove the window before the next
-command."
-  (when (get-buffer-window buffer-name) (delete-windows-on buffer-name))
-  (cond ((or (string-match "\n" message)
-             (> (length message) (1- (frame-width))))
-         (lexical-let ((buffer (get-buffer-create buffer-name)))
-           (with-current-buffer buffer
-             (erase-buffer)
-             (insert message)
-             (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)))))
-           (push (lambda () (delete-windows-on buffer) (bury-buffer buffer))
-                 slime-pre-command-actions)))
-        (t (message "%s" message))))
-
-(defun slime-create-message-window ()
-  "Create a window at the bottom of the frame, above the minibuffer."
-  (let ((previous (previous-window (minibuffer-window))))
-    (when (<= (window-height previous) (* 2 window-min-height))
-      (save-selected-window 
-        (select-window previous)
-        (enlarge-window (- (1+ (* 2 window-min-height))
-                           (window-height previous)))))
-    (split-window previous)))
-
 (defvar slime-background-message-function 'slime-display-oneliner)
 
 ;; Interface
@@ -8904,10 +8866,11 @@
 (slime-DEFUN-if-undefined set-process-coding-system 
     (process &optional decoding encoding))
 
-(slime-DEFUN-if-undefined display-warning  
-                          (type message &optional level buffer-name)
-  (slime-display-message (apply #'format (concat "Warning (%s): " message) type args)
-                         "*Warnings*"))
+;; For Emacs 21
+(slime-DEFUN-if-undefined display-warning 
+    (type message &optional level buffer-name)
+  (with-output-to-temp-buffer "*Warnings*"
+    (princ (apply #'format (concat "Warning (%s): " message) type args))))
 
 (unless (boundp 'temporary-file-directory)
   (defvar temporary-file-directory





More information about the slime-cvs mailing list