changeset 75687:8cf73d911b65

(unload-feature): Silently ignore `load-history' entries of the form `(defface . SYMBOL)', and treat `(autoload . SYMBOL)' entries like `defun'. Return nil.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 05 Feb 2007 23:40:40 +0000
parents 514805720b93
children 5e8aa708d555
files lisp/loadhist.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/loadhist.el	Mon Feb 05 22:36:13 2007 +0000
+++ b/lisp/loadhist.el	Mon Feb 05 23:40:40 2007 +0000
@@ -215,7 +215,7 @@
 	   ;; Remove any feature names that this file provided.
 	   (provide
 	    (setq features (delq (cdr x) features)))
-	   (defun
+	   ((defun autoload)
 	    (let ((fun (cdr x)))
 	      (when (fboundp fun)
 		(when (fboundp 'ad-unadvise)
@@ -224,7 +224,7 @@
 		  (if aload
                       (fset fun (cons 'autoload aload))
                     (fmakunbound fun))))))
-           ((t require) nil)
+           ((t require defface) nil)
 	   (t (message "Unexpected element %s in load-history" x)))
 	;; Kill local values as much as possible.
 	(dolist (buf (buffer-list))
@@ -238,7 +238,9 @@
 	(unless (local-variable-if-set-p x)
 	  (makunbound x))))
     ;; Delete the load-history element for this file.
-    (setq load-history (delq (assoc file load-history) load-history))))
+    (setq load-history (delq (assoc file load-history) load-history)))
+  ;; Don't return load-history, it is not useful.
+  nil)
 
 (provide 'loadhist)