(U+6215): Apply new conventions for glyph granularity.
[chise/xemacs-chise.git.1] / lisp / loadhist.el
index 7783fd3..228aa09 100644 (file)
@@ -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)))))