diff options
| author | Richard M. Stallman | 1995-01-20 23:13:51 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-01-20 23:13:51 +0000 |
| commit | e01ac82c3ea516c9212744de441ff769c96a3dcf (patch) | |
| tree | c158c53bee1fd686260e1f0d9e26dd5c6d3127f1 /lisp/loadhist.el | |
| parent | 7112bf0f2a1ab3fc16f4234088247e3f56e2ac2b (diff) | |
| download | emacs-e01ac82c3ea516c9212744de441ff769c96a3dcf.tar.gz emacs-e01ac82c3ea516c9212744de441ff769c96a3dcf.zip | |
(unload-feature): Don't care if FILE is a dependency of itself.
Diffstat (limited to 'lisp/loadhist.el')
| -rw-r--r-- | lisp/loadhist.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 23091d1f0f3..e2a598f8a2c 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el | |||
| @@ -71,7 +71,8 @@ a buffer with no associated file, or an eval-region, return nil." | |||
| 71 | )) | 71 | )) |
| 72 | 72 | ||
| 73 | (defun file-dependents (file) | 73 | (defun file-dependents (file) |
| 74 | ;; Return the list of loaded libraries that depend on FILE. | 74 | "Return the list of loaded libraries that depend on FILE. |
| 75 | This can include FILE itself." | ||
| 75 | (let ((provides (file-provides file)) (dependents nil)) | 76 | (let ((provides (file-provides file)) (dependents nil)) |
| 76 | (mapcar | 77 | (mapcar |
| 77 | (function (lambda (x) | 78 | (function (lambda (x) |
| @@ -90,7 +91,8 @@ is nil, raise an error." | |||
| 90 | (if (not (featurep feature)) | 91 | (if (not (featurep feature)) |
| 91 | (error "%s is not a currently loaded feature." (symbol-name feature))) | 92 | (error "%s is not a currently loaded feature." (symbol-name feature))) |
| 92 | (if (not force) | 93 | (if (not force) |
| 93 | (let* ((file (feature-file feature)) (dependents (file-dependents file))) | 94 | (let* ((file (feature-file feature)) |
| 95 | (dependents (delete file (copy-sequence (file-dependents file))))) | ||
| 94 | (if dependents | 96 | (if dependents |
| 95 | (error "Loaded libraries %s depend on %s." | 97 | (error "Loaded libraries %s depend on %s." |
| 96 | (prin1-to-string dependents) file) | 98 | (prin1-to-string dependents) file) |