comparison lisp/loadhist.el @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 3ecd8885ac67
children 25e260cb7994
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
121 (let* ((file (feature-file feature)) 121 (let* ((file (feature-file feature))
122 (dependents (delete file (copy-sequence (file-dependents file))))) 122 (dependents (delete file (copy-sequence (file-dependents file)))))
123 (when dependents 123 (when dependents
124 (error "Loaded libraries %s depend on %s" 124 (error "Loaded libraries %s depend on %s"
125 (prin1-to-string dependents) file)))) 125 (prin1-to-string dependents) file))))
126 (let* ((flist (feature-symbols feature)) (file (car flist))) 126 (let* ((flist (feature-symbols feature))
127 (file (car flist)))
128 (flet ((reset-aload (x)
129 (let ((aload (get x 'autoload)))
130 (if aload (fset x (cons 'autoload aload))))))
127 (mapcar 131 (mapcar
128 #'(lambda (x) 132 #'(lambda (x)
129 (cond ((stringp x) nil) 133 (cond ((stringp x) nil)
130 ((consp x) 134 ((consp x)
131 ;; Remove any feature names that this file provided. 135 ;; Remove any feature names that this file provided.
132 (if (eq (car x) 'provide) 136 (if (eq (car x) 'provide)
133 (setq features (delq (cdr x) features)))) 137 (setq features (delq (cdr x) features))))
134 ((boundp x) (makunbound x)) 138 ((and (boundp x)
139 (fboundp x))
140 (makunbound x)
141 (fmakunbound x)
142 (reset-aload x))
143 ((boundp x)
144 (makunbound x))
135 ((fboundp x) 145 ((fboundp x)
136 (fmakunbound x) 146 (fmakunbound x)
137 (let ((aload (get x 'autoload))) 147 (reset-aload x))))
138 (if aload (fset x (cons 'autoload aload))))))) 148 (cdr flist)))
139 (cdr flist))
140 ;; Delete the load-history element for this file. 149 ;; Delete the load-history element for this file.
141 (let ((elt (assoc file load-history))) 150 (let ((elt (assoc file load-history)))
142 (setq load-history (delq elt load-history))))) 151 (setq load-history (delq elt load-history)))))
143 152
144 (provide 'loadhist) 153 (provide 'loadhist)