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

Diff of /slime/swank.lisp

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

revision 1.567 by heller, Tue Aug 12 12:56:57 2008 UTC revision 1.568 by heller, Tue Aug 12 12:57:02 2008 UTC
# Line 142  ALIST is a list of the form ((VAR . VAL) Line 142  ALIST is a list of the form ((VAR . VAL)
142       (defun ,name ,arglist ,@rest)       (defun ,name ,arglist ,@rest)
143       ;; see <http://www.franz.com/support/documentation/6.2/doc/pages/variables/compiler/s_cltl1-compile-file-toplevel-compatibility-p_s.htm>       ;; see <http://www.franz.com/support/documentation/6.2/doc/pages/variables/compiler/s_cltl1-compile-file-toplevel-compatibility-p_s.htm>
144       (eval-when (:compile-toplevel :load-toplevel :execute)       (eval-when (:compile-toplevel :load-toplevel :execute)
145         (export ',name :swank))))         (export ',name (symbol-package ',name)))))
146    
147  (defun missing-arg ()  (defun missing-arg ()
148    "A function that the compiler knows will never to return a value.    "A function that the compiler knows will never to return a value.
# Line 1601  buffer are best read in this package.  S Line 1601  buffer are best read in this package.  S
1601  (define-special *buffer-readtable*  (define-special *buffer-readtable*
1602      "Readtable associated with the current buffer")      "Readtable associated with the current buffer")
1603    
1604  (defmacro with-buffer-syntax ((&rest _) &body body)  (defmacro with-buffer-syntax ((&optional package) &body body)
1605    "Execute BODY with appropriate *package* and *readtable* bindings.    "Execute BODY with appropriate *package* and *readtable* bindings.
1606    
1607  This should be used for code that is conceptionally executed in an  This should be used for code that is conceptionally executed in an
1608  Emacs buffer."  Emacs buffer."
1609    (destructuring-bind () _    `(call-with-buffer-syntax ,package (lambda () ,@body)))
     `(call-with-buffer-syntax (lambda () ,@body))))  
1610    
1611  (defun call-with-buffer-syntax (fun)  (defun call-with-buffer-syntax (package fun)
1612    (let ((*package* *buffer-package*))    (let ((*package* (if package
1613                           (guess-buffer-package package)
1614                           *buffer-package*)))
1615      ;; Don't shadow *readtable* unnecessarily because that prevents      ;; Don't shadow *readtable* unnecessarily because that prevents
1616      ;; the user from assigning to it.      ;; the user from assigning to it.
1617      (if (eq *readtable* *buffer-readtable*)      (if (eq *readtable* *buffer-readtable*)
# Line 1637  gracefully." Line 1638  gracefully."
1638      (let ((*read-suppress* nil))      (let ((*read-suppress* nil))
1639        (read-from-string string))))        (read-from-string string))))
1640    
1641    (defun parse-string (string package)
1642      "Read STRING in PACKAGE."
1643      (with-buffer-syntax (package)
1644        (let ((*read-suppress* nil))
1645          (read-from-string string))))
1646    
1647  ;; FIXME: deal with #\| etc.  hard to do portably.  ;; FIXME: deal with #\| etc.  hard to do portably.
1648  (defun tokenize-symbol (string)  (defun tokenize-symbol (string)
1649    "STRING is interpreted as the string representation of a symbol    "STRING is interpreted as the string representation of a symbol

Legend:
Removed from v.1.567  
changed lines
  Added in v.1.568

  ViewVC Help
Powered by ViewVC 1.1.5