Commit 394c682a authored by Christophe Rhodes's avatar Christophe Rhodes

Be more careful about file-write-date; new sbcls will error if the file

is not present.
parent 997b3ab9
......@@ -329,10 +329,11 @@ file if necessary."
(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
(with-open-file (stream filepath :direction :input)
(make-buffer-from-stream stream))
(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 @@ file if necessary."
(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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment