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

Diff of /slime/swank-lispworks.lisp

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

revision 1.44 by lgorrie, Thu Jun 17 10:10:48 2004 UTC revision 1.45 by lgorrie, Thu Jun 17 11:39:27 2004 UTC
# Line 346  Return NIL if the symbol is unbound." Line 346  Return NIL if the symbol is unbound."
346      (null (list :position offset))      (null (list :position offset))
347      (symbol (list :function-name (string dspec)))))      (symbol (list :function-name (string dspec)))))
348    
349    (defmacro with-fairly-standard-io-syntax (&body body)
350      "Like WITH-STANDARD-IO-SYNTAX but preserve *PACKAGE* and *READTABLE*."
351      (let ((package (gensym))
352            (readtable (gensym)))
353        `(let ((,package *package*)
354               (,readtable *readtable*))
355          (with-standard-io-syntax
356            (let ((*package* ,package)
357                  (*readtable* ,readtable))
358              ,@body)))))
359    
360  #-(or lispworks-4.1 lispworks-4.2)      ; no dspec:parse-form-dspec prior to 4.3  #-(or lispworks-4.1 lispworks-4.2)      ; no dspec:parse-form-dspec prior to 4.3
361  (defun dspec-stream-position (stream dspec)  (defun dspec-stream-position (stream dspec)
362    (let ((*read-eval* t))    (with-fairly-standard-io-syntax
363      (loop (let* ((pos (file-position stream))      (loop (let* ((pos (file-position stream))
364                   (form (read stream nil '#1=#:eof)))                   (form (read stream nil '#1=#:eof)))
365              (when (eq form '#1#)              (when (eq form '#1#)

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

  ViewVC Help
Powered by ViewVC 1.1.5