# HG changeset patch # User Richard M. Stallman # Date 790643631 0 # Node ID 8fb25f2475333177d79b133eae1b225c3bced22d # Parent 6e00457b6f867ff272378298b418c8acaa9b7f8b (unload-feature): Don't care if FILE is a dependency of itself. diff -r 6e00457b6f86 -r 8fb25f247533 lisp/loadhist.el --- 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)