Update of /project/climacs/cvsroot/climacs In directory common-lisp.net:/tmp/cvs-serv32062
Modified Files: gui.lisp Log Message: find-file does not create the file if it does not exist. (thanks to Lawrence Mitchell)
Date: Tue Jan 18 21:28:38 2005 Author: rstrandh
Index: climacs/gui.lisp diff -u climacs/gui.lisp:1.83 climacs/gui.lisp:1.84 --- climacs/gui.lisp:1.83 Tue Jan 18 21:21:16 2005 +++ climacs/gui.lisp Tue Jan 18 21:28:38 2005 @@ -546,8 +546,10 @@ (push buffer (buffers *application-frame*)) (setf (buffer (current-window)) buffer) (setf (syntax buffer) (make-instance 'basic-syntax)) - (with-open-file (stream filename :direction :input :if-does-not-exist :create) - (input-from-stream stream buffer 0)) + ;; Don't want to create the file if it doesn't exist. + (when (probe-file filename) + (with-open-file (stream filename :direction :input) + (input-from-stream stream buffer 0))) (setf (filename buffer) filename (name buffer) (pathname-filename filename) (needs-saving buffer) nil)