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

Diff of /slime/swank.lisp

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

revision 1.99 by lgorrie, Fri Jan 16 06:50:52 2004 UTC revision 1.100 by heller, Fri Jan 16 07:26:13 2004 UTC
# Line 157  Emacs.") Line 157  Emacs.")
157    
158  ;;;; Helper macros  ;;;; Helper macros
159    
160  (defmacro with-I/O-lock (() &body body)  (defmacro with-I/O-lock ((&rest ignore) &body body)
161      (declare (ignore ignore))
162    `(call-with-lock-held *write-lock* (lambda () ,@body)))    `(call-with-lock-held *write-lock* (lambda () ,@body)))
163    
164  (defmacro with-io-redirection ((&optional (connection '(current-connection)))  (defmacro with-io-redirection ((&optional (connection '(current-connection)))
# Line 270  This is an optimized way for Lisp to del Line 271  This is an optimized way for Lisp to del
271    "Return the datestring of the latest ChangeLog entry.  The date is    "Return the datestring of the latest ChangeLog entry.  The date is
272  determined at compile time."  determined at compile time."
273    (macrolet ((date ()    (macrolet ((date ()
274                 (let* ((dir (pathname-directory *compile-file-pathname*))                 (let* ((here (or *compile-file-truename* *load-truename*))
275                        (changelog (make-pathname :name "ChangeLog" :directory dir                        (changelog (make-pathname
276                                                  :host (pathname-host                                    :name "ChangeLog"
277                                                         *compile-file-pathname*)))                                    :directory (pathname-directory here)
278                                      :host (pathname-host here)))
279                        (date (with-open-file (file changelog :direction :input)                        (date (with-open-file (file changelog :direction :input)
280                                (string (read file)))))                                (string (read file)))))
281                   `(quote ,date))))                   `(quote ,date))))
# Line 318  determined at compile time." Line 320  determined at compile time."
320  (defun current-socket-io ()  (defun current-socket-io ()
321    (connection.socket-io (current-connection)))    (connection.socket-io (current-connection)))
322    
323  (defmacro with-a-connection (() &body body)  (defmacro with-a-connection ((&rest ignore) &body body)
324    "Execute BODY with a connection.    "Execute BODY with a connection.
325  If no connection is currently available then a new one is  If no connection is currently available then a new one is
326  temporarily created for the extent of the execution.  temporarily created for the extent of the execution.
327    
328  Thus the BODY forms can call READ-FROM-EMACS and SEND-TO-EMACS."  Thus the BODY forms can call READ-FROM-EMACS and SEND-TO-EMACS."
329      (declare (ignore ignore))
330    `(if (current-connection)    `(if (current-connection)
331         (progn ,@body)         (progn ,@body)
332         (call-with-aux-connection (lambda () ,@body))))         (call-with-aux-connection (lambda () ,@body))))

Legend:
Removed from v.1.99  
changed lines
  Added in v.1.100

  ViewVC Help
Powered by ViewVC 1.1.5