X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Floadhist.el;h=228aa09250ce02d10023ba126ae7fe00841b6e09;hb=9f7593526f487e8b5272d5aa2a72facbf121b23e;hp=7783fd3132b222df1b5102596001b8438b338aaf;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 7783fd3..228aa09 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -123,7 +123,11 @@ is nil, raise an error." (when dependents (error "Loaded libraries %s depend on %s" (prin1-to-string dependents) file)))) - (let* ((flist (feature-symbols feature)) (file (car flist))) + (let* ((flist (feature-symbols feature)) + (file (car flist))) + (flet ((reset-aload (x) + (let ((aload (get x 'autoload))) + (if aload (fset x (cons 'autoload aload)))))) (mapcar #'(lambda (x) (cond ((stringp x) nil) @@ -131,12 +135,17 @@ is nil, raise an error." ;; Remove any feature names that this file provided. (if (eq (car x) 'provide) (setq features (delq (cdr x) features)))) - ((boundp x) (makunbound x)) + ((and (boundp x) + (fboundp x)) + (makunbound x) + (fmakunbound x) + (reset-aload x)) + ((boundp x) + (makunbound x)) ((fboundp x) (fmakunbound x) - (let ((aload (get x 'autoload))) - (if aload (fset x (cons 'autoload aload))))))) - (cdr flist)) + (reset-aload x)))) + (cdr flist))) ;; Delete the load-history element for this file. (let ((elt (assoc file load-history))) (setq load-history (delq elt load-history)))))