[slime-devel] patch - ChangeLog fault

Robert Lehr bozzio at the-lehrs.com
Wed Jan 12 04:02:25 UTC 2005


slime-connect in v1.0 faults during initialization if the ChangeLog is
not in the expected place.  This patch prevents that by verifying the
file's existence before attempting to read it.

-- 

Robert
-------------- next part --------------
--- slime.el	Sat Sep  4 12:19:52 2004
+++ /tmp/slime.el	Tue Jan 11 22:55:24 2005
@@ -2179,10 +2179,13 @@
 
 (defun slime-changelog-date ()
   "Return the datestring of the latest entry in the ChangeLog file."
-  (with-temp-buffer 
-    (insert-file-contents (concat slime-path "ChangeLog") nil 0 100)
-    (goto-char (point-min))
-    (symbol-name (read (current-buffer)))))
+  (let ((path-changelog (concat slime-path "ChangeLog")))
+    (if (file-exists-p path-changelog)
+	(with-temp-buffer 
+	  (insert-file-contents path-changelog nil 0 100)
+	  (goto-char (point-min))
+	  (symbol-name (read (current-buffer))))
+      "- ChangeLog file not found")))
 
 (defun slime-init-output-buffer (connection)
   (with-current-buffer (slime-output-buffer t)


More information about the slime-devel mailing list