[slime-cvs] CVS update: slime/swank-backend.lisp
Helmut Eller
heller at common-lisp.net
Thu Sep 22 20:17:33 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv17623
Modified Files:
swank-backend.lisp
Log Message:
(*gray-stream-symbols*): Collect the needed symbols here, so that we
don't need to mention them in every backend.
(import-from). New function.
Date: Thu Sep 22 22:17:32 2005
Author: heller
Index: slime/swank-backend.lisp
diff -u slime/swank-backend.lisp:1.87 slime/swank-backend.lisp:1.88
--- slime/swank-backend.lisp:1.87 Sun Aug 28 16:47:11 2005
+++ slime/swank-backend.lisp Thu Sep 22 22:17:32 2005
@@ -155,6 +155,27 @@
(import real-symbol :swank-mop)
(export real-symbol :swank-mop)))))
+(defvar *gray-stream-symbols*
+ '(:fundamental-character-output-stream
+ :stream-write-char
+ :stream-fresh-line
+ :stream-force-output
+ :stream-finish-output
+ :fundamental-character-input-stream
+ :stream-read-char
+ :stream-listen
+ :stream-unread-char
+ :stream-clear-input
+ :stream-line-column
+ :stream-read-char-no-hang))
+
+(defun import-from (package symbol-names &optional (to-package *package*))
+ "Import the list of SYMBOL-NAMES found in the package PACKAGE."
+ (dolist (name symbol-names)
+ (multiple-value-bind (symbol found) (find-symbol (string name) package)
+ (assert found () "Symbol ~A not found in package ~A" name package)
+ (import symbol to-package))))
+
;;;; Utilities
More information about the slime-cvs
mailing list