/[slime]/slime/swank-backend.lisp
ViewVC logotype

Diff of /slime/swank-backend.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.87 by mkoeppe, Sun Aug 28 14:47:11 2005 UTC revision 1.94 by heller, Sun Nov 20 23:25:38 2005 UTC
# Line 155  EXCEPT is a list of symbol names which s Line 155  EXCEPT is a list of symbol names which s
155          (import real-symbol :swank-mop)          (import real-symbol :swank-mop)
156          (export real-symbol :swank-mop)))))          (export real-symbol :swank-mop)))))
157    
158    (defvar *gray-stream-symbols*
159      '(:fundamental-character-output-stream
160        :stream-write-char
161        :stream-fresh-line
162        :stream-force-output
163        :stream-finish-output
164        :fundamental-character-input-stream
165        :stream-read-char
166        :stream-listen
167        :stream-unread-char
168        :stream-clear-input
169        :stream-line-column
170        :stream-read-char-no-hang
171        ;; STREAM-LINE-LENGTH is an extension to gray streams that's apparently
172        ;; supported by CMUCL, OpenMCL, SBCL and SCL.
173        #+(or cmu openmcl sbcl scl)
174        :stream-line-length))
175    
176    (defun import-from (package symbol-names &optional (to-package *package*))
177      "Import the list of SYMBOL-NAMES found in the package PACKAGE."
178      (dolist (name symbol-names)
179        (multiple-value-bind (symbol found) (find-symbol (string name) package)
180          (assert found () "Symbol ~A not found in package ~A" name package)
181          (import symbol to-package))))
182    
183    
184  ;;;; Utilities  ;;;; Utilities
185    
# Line 186  EXCEPT is a list of symbol names which s Line 211  EXCEPT is a list of symbol names which s
211  (definterface close-socket (socket)  (definterface close-socket (socket)
212    "Close the socket SOCKET.")    "Close the socket SOCKET.")
213    
214  (definterface accept-connection (socket &key external-format)  (definterface accept-connection (socket &key external-format
215     "Accept a client connection on the listening socket SOCKET.  Return                                          buffering)
216  a stream for the new connection.")     "Accept a client connection on the listening socket SOCKET.
217    Return a stream for the new connection.")
218    
219  (definterface add-sigio-handler (socket fn)  (definterface add-sigio-handler (socket fn)
220    "Call FN whenever SOCKET is readable.")    "Call FN whenever SOCKET is readable.")
# Line 373  The result is either a symbol, a list, o Line 399  The result is either a symbol, a list, o
399     "Recursively expand all macros in FORM.     "Recursively expand all macros in FORM.
400  Return the resulting form.")  Return the resulting form.")
401    
402    (definterface compiler-macroexpand-1 (form &optional env)
403      "Call the compiler-macro for form.
404    If FORM is a function call for which a compiler-macro has been
405    defined, invoke the expander function using *macroexpand-hook* and
406    return the results and T.  Otherwise, return the original form and
407    NIL."
408      (let ((fun (and (consp form) (compiler-macro-function (car form)))))
409        (if fun
410            (let ((result (funcall *macroexpand-hook* fun form env)))
411              (values result (not (eq result form))))
412            (values form nil))))
413    
414    (definterface compiler-macroexpand (form &optional env)
415      "Repetitively call `compiler-macroexpand-1'."
416      (labels ((frob (form expanded)
417                 (multiple-value-bind (new-form newly-expanded)
418                     (compiler-macroexpand-1 form env)
419                   (if newly-expanded
420                       (frob new-form t)
421                       (values new-form expanded)))))
422        (frob form env)))
423    
424  (definterface describe-symbol-for-emacs (symbol)  (definterface describe-symbol-for-emacs (symbol)
425     "Return a property list describing SYMBOL.     "Return a property list describing SYMBOL.
426    
# Line 405  Return a documentation string, or NIL if Line 453  Return a documentation string, or NIL if
453    
454  ;;;; Debugging  ;;;; Debugging
455    
456    (definterface install-debugger-globally (function)
457      "Install FUNCTION as the debugger for all threads/processes. This
458    usually involves setting *DEBUGGER-HOOK* and, if the implementation
459    permits, hooking into BREAK as well."
460      (setq *debugger-hook* function))
461    
462  (definterface call-with-debugging-environment (debugger-loop-fn)  (definterface call-with-debugging-environment (debugger-loop-fn)
463     "Call DEBUGGER-LOOP-FN in a suitable debugging environment.     "Call DEBUGGER-LOOP-FN in a suitable debugging environment.
464    
# Line 724  output of CL:DESCRIBE." Line 778  output of CL:DESCRIBE."
778  ;;; The default implementations are sufficient for non-multiprocessing  ;;; The default implementations are sufficient for non-multiprocessing
779  ;;; implementations.  ;;; implementations.
780    
781  (definterface startup-multiprocessing ()  (definterface initialize-multiprocessing ()
782     "Initialize multiprocessing, if necessary.     "Initialize multiprocessing, if necessary."
783       nil)
784    
785  This function is called directly through the listener, not in an RPC  (definterface startup-idle-and-top-level-loops ()
786      "This function is called directly through the listener, not in an RPC
787  from Emacs. This is to support interfaces such as CMUCL's  from Emacs. This is to support interfaces such as CMUCL's
788  MP::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS which does not return like a  MP::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS which does not return like a
789  normal function."  normal function."

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.94

  ViewVC Help
Powered by ViewVC 1.1.5