[climacs-cvs] CVS climacs

crhodes crhodes at common-lisp.net
Fri Jan 4 11:14:08 UTC 2008


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv25939

Modified Files:
	core.lisp 
Log Message:
Be more careful about file-write-date; new sbcls will error if the file 
is not present.


--- /project/climacs/cvsroot/climacs/core.lisp	2007/12/28 15:39:49	1.21
+++ /project/climacs/cvsroot/climacs/core.lisp	2008/01/04 11:14:08	1.22
@@ -329,10 +329,11 @@
                    (beep)
                    (display-message "No such file: ~A" filepath)
                    (return-from find-file-impl nil)))
-               (let* ((buffer (if (probe-file filepath)
+               (let* ((newp (not (probe-file filepath)))
+                      (buffer (if newp
+                                  (make-new-buffer)
                                   (with-open-file (stream filepath :direction :input)
-                                    (make-buffer-from-stream stream))
-                                  (make-new-buffer)))
+                                    (make-buffer-from-stream stream))))
                       (view (make-new-view-for-climacs
                              *esa-instance* 'textual-drei-syntax-view
                              :name (filepath-filename filepath)
@@ -344,7 +345,7 @@
                                      (split-window t))))
                  (setf (offset (point buffer)) (offset (point view))
                        (syntax view) (make-syntax-for-view view (syntax-class-name-for-filepath filepath))
-                       (file-write-time buffer) (file-write-date filepath)
+                       (file-write-time buffer) (if newp (get-universal-time) (file-write-date filepath))
                        (needs-saving buffer) nil
                        (name buffer) (filepath-filename filepath))
                  (setf (current-view (current-window)) view)




More information about the Climacs-cvs mailing list