~ubuntu-branches/ubuntu/intrepid/slime/intrepid

« back to all changes in this revision

Viewing changes to present.lisp

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2007-05-04 22:18:29 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504221829-lhtgdzbpcaaiwii9
Tags: 1:20070409-1
Fixed XS-Vcs-Bzr item in control file 

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
                          thereis (or (eq stream (connection.dedicated-output connection))
97
97
                                      (eq stream (connection.socket-io connection))
98
98
                                      (eq stream (connection.user-output connection))
99
 
                                      (eq stream (connection.user-io connection))))))))))
 
99
                                      (eq stream (connection.user-io connection))
 
100
                                      (eq stream (connection.repl-results connection))))))))))
100
101
 
101
102
(defun can-present-readable-objects (&optional stream)
102
103
  (declare (ignore stream))
168
169
          (write-annotation stream #'presentation-end record)))
169
170
      (funcall continue)))
170
171
 
171
 
(defun make-presentations-result (values)
 
172
(defun send-repl-results-to-emacs (values)
172
173
  ;; Override a function in swank.lisp, so that 
173
174
  ;; nested presentations work in the REPL result.
174
 
  (cond 
175
 
    ((null values)
176
 
     '(:values ()))
177
 
    (t
178
 
     ;; Do the output ourselves.
179
 
     (fresh-line)
180
 
     (dolist (o values)
181
 
       (presenting-object o *standard-output*
182
 
         (prin1 o))
183
 
       (terpri))
184
 
     '(:suppress-output))))
 
175
  (let ((repl-results (connection.repl-results *emacs-connection*)))
 
176
    (flet ((send (value)
 
177
             (presenting-object value repl-results
 
178
               (prin1 value repl-results))
 
179
             (terpri repl-results)))
 
180
      (if (null values)
 
181
          (progn 
 
182
            (princ "; No value" repl-results)
 
183
            (terpri repl-results))
 
184
          (mapc #'send values)))
 
185
    (finish-output repl-results)))
185
186
 
186
187
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
187
188