Commits

youngs  committed 3d61817

2002-02-23 Peter Arius <peter.arius@erln.gepas.de>

* shadowfile.el (shadow-write-info-file): Use 'buffer-live-p' to
check for killed buffers.
(shadow-write-todo-file): Ditto.
(shadow-save-todo-file): Ditto.

  • Participants
  • Parent commits e5cca46

Comments (0)

Files changed (2)

+2002-02-23  Peter Arius  <peter.arius@erln.gepas.de>
+
+	* shadowfile.el (shadow-write-info-file): Use 'buffer-live-p' to
+	check for killed buffers.
+	(shadow-write-todo-file): Ditto.
+	(shadow-save-todo-file): Ditto.
+
 2001-09-28  Stephen J. Turnbull  <stepheen@xemacs.org>
 
 	* xemacsbug.el (report-emacs-bug):  Missing autoload.

File shadowfile.el

   (shadow-invalidate-hashtable)
   (if shadow-info-file
       (save-excursion
-	(if (not shadow-info-buffer)
+	(or (buffer-live-p shadow-info-buffer)
 	    (setq shadow-info-buffer (find-file-noselect shadow-info-file)))
 	(set-buffer shadow-info-buffer)
 	(delete-region (point-min) (point-max))
   "Write out information to shadow-todo-file.  
 With nonnil argument also saves the buffer."
   (save-excursion
-    (if (not shadow-todo-buffer)
+    (or (buffer-live-p shadow-todo-buffer)
 	(setq shadow-todo-buffer (find-file-noselect shadow-todo-file)))
     (set-buffer shadow-todo-buffer)
     (delete-region (point-min) (point-max))
     (if save (shadow-save-todo-file))))
 
 (defun shadow-save-todo-file ()
-  (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer))
+  (if (and (buffer-live-p shadow-todo-buffer)
+	   (buffer-modified-p shadow-todo-buffer))
       (save-excursion
 	(set-buffer shadow-todo-buffer)
 	(condition-case nil		; have to continue even in case of