[slime-cvs] CVS update: slime/slime.el

Helmut Eller heller at common-lisp.net
Wed Jan 12 17:08:53 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv3415

Modified Files:
	slime.el 
Log Message:
(slime-changelog-date): Return nil if the ChangLog file doesn't exits.
(slime-repl-update-banner): Write "ChangLog file not found" if the
ChangeLog doesn't exist.
Date: Wed Jan 12 18:08:48 2005
Author: heller

Index: slime/slime.el
diff -u slime/slime.el:1.445 slime/slime.el:1.446
--- slime/slime.el:1.445	Wed Jan 12 17:54:41 2005
+++ slime/slime.el	Wed Jan 12 18:08:46 2005
@@ -2320,15 +2320,21 @@
       (setq header-line-format banner))
     (when animantep
       (pop-to-buffer (current-buffer))
-      (animate-string (format "; SLIME %s" (slime-changelog-date)) 0 0))
+      (animate-string (format "; SLIME %s" (or (slime-changelog-date) 
+                                               "- ChangeLog file not found"))
+                      0 0))
     (slime-repl-insert-prompt (if use-header-p "" (concat "; " banner)))))
 
 (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)))))
+  "Return the datestring of the latest entry in the ChangeLog file.
+Return nil if the ChangeLog file cannot be found."
+  (let ((changelog (concat slime-path "ChangeLog")))
+    (if (file-exists-p changelog)
+        (with-temp-buffer 
+          (insert-file-contents changelog nil 0 100)
+          (goto-char (point-min))
+          (symbol-name (read (current-buffer))))
+      nil)))
 
 (defun slime-init-output-buffer (connection)
   (with-current-buffer (slime-output-buffer t)




More information about the slime-cvs mailing list