[slime-cvs] CVS update: slime/slime.el

Helmut Eller heller at common-lisp.net
Mon Dec 15 15:53:29 UTC 2003


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv27344

Modified Files:
	slime.el 
Log Message:
(slime-eval-last-expression-display-output): New command.  Bound to
C-x M-e.  Suggested by Nicolas Neuss.
(slime-display-output-buffer): New function.
(slime-slime-compile-file): Use it.

Date: Mon Dec 15 10:53:29 2003
Author: heller

Index: slime/slime.el
diff -u slime/slime.el:1.147 slime/slime.el:1.148
--- slime/slime.el:1.147	Mon Dec 15 00:27:44 2003
+++ slime/slime.el	Mon Dec 15 10:53:29 2003
@@ -360,6 +360,7 @@
     ("\M-," slime-pop-find-definition-stack :inferior t :sldb t)
     ;; Evaluating
     ("\C-x\C-e" slime-eval-last-expression :inferior t)
+    ("\C-x\M-e" slime-eval-last-expression-display-output :inferior t)
     ("\C-p" slime-pprint-eval-last-expression :prefixed t :inferior t)
     ("\C-r" slime-eval-region :prefixed t :inferior t)
     ("\C-\M-x" slime-eval-defun)
@@ -1173,7 +1174,8 @@
      (setq slime-lisp-features features)
      t)
     ((:%apply fn args)
-     (apply (intern fn) args))
+     (apply (intern fn) args)
+     t)
     ((:awaiting-goahead thread-id thread-name reason)
      (slime-register-waiting-thread thread-id thread-name reason))
     (t nil)))
@@ -1552,6 +1554,13 @@
           (end slime-repl-prompt-start-mark))
       (funcall slime-show-last-output-function start end))))
 
+(defun slime-display-output-buffer ()
+  "Display the output bufer and scroll to bottom."
+  (with-current-buffer (slime-output-buffer)
+    (goto-char (point-max))
+    (set-window-start (display-buffer (current-buffer) t)
+                      (line-beginning-position))))
+
 (defmacro slime-with-output-at-eob (&rest body)
   "Execute BODY at eob.  
 If point is initially at eob and the buffer is visible update
@@ -2035,10 +2044,7 @@
   (unless (eq major-mode 'lisp-mode)
     (error "Only valid in lisp-mode"))
   (save-some-buffers)
-  (with-current-buffer (slime-output-buffer)
-    (goto-char (point-max))
-    (set-window-start (display-buffer (current-buffer) t)
-                      (line-beginning-position)))
+  (slime-display-output-buffer)
   (slime-eval-async
    `(swank:swank-compile-file ,(buffer-file-name) ,(if load t nil))
    nil
@@ -2979,6 +2985,12 @@
 (defun slime-eval-last-expression ()
   "Evaluate the expression preceding point."
   (interactive)
+  (slime-interactive-eval (slime-last-expression)))
+
+(defun slime-eval-last-expression-display-output ()
+  "Display output buffer and evaluate the expression preceding point."
+  (interactive)
+  (slime-display-output-buffer)
   (slime-interactive-eval (slime-last-expression)))
   
 (defun slime-eval-defun ()





More information about the slime-cvs mailing list