changeset 10498:8fb25f247533

(unload-feature): Don't care if FILE is a dependency of itself.
author Richard M. Stallman <rms@gnu.org>
date Fri, 20 Jan 1995 23:13:51 +0000
parents 6e00457b6f86
children 6368f8d9bf07
files lisp/loadhist.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/loadhist.el	Fri Jan 20 23:06:06 1995 +0000
+++ b/lisp/loadhist.el	Fri Jan 20 23:13:51 1995 +0000
@@ -71,7 +71,8 @@
     ))
 
 (defun file-dependents (file)
-  ;; Return the list of loaded libraries that depend on FILE.
+  "Return the list of loaded libraries that depend on FILE.
+This can include FILE itself."
   (let ((provides (file-provides file)) (dependents nil))
     (mapcar
      (function (lambda (x) 
@@ -90,7 +91,8 @@
   (if (not (featurep feature))
       (error "%s is not a currently loaded feature." (symbol-name feature)))
   (if (not force)
-      (let* ((file (feature-file feature)) (dependents (file-dependents file)))
+      (let* ((file (feature-file feature))
+	     (dependents (delete file (copy-sequence (file-dependents file)))))
 	(if dependents
 	    (error "Loaded libraries %s depend on %s."
 		   (prin1-to-string dependents) file)