[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/loadhist.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/loadhist.el,v |
Date: |
Sun, 11 Feb 2007 11:11:10 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 07/02/11 11:11:09
Index: loadhist.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/loadhist.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- loadhist.el 5 Feb 2007 23:40:40 -0000 1.44
+++ loadhist.el 11 Feb 2007 11:11:09 -0000 1.45
@@ -173,6 +173,9 @@
(prin1-to-string dependents) file))))
(let* ((unload-hook-features-list (feature-symbols feature))
(file (pop unload-hook-features-list))
+ ;; If non-nil, this is a symbol for which we should
+ ;; restore a previous autoload if possible.
+ restore-autoload
(unload-hook (intern-soft (concat (symbol-name feature)
"-unload-hook"))))
;; Try to avoid losing badly when hooks installed in critical
@@ -209,6 +212,7 @@
(dolist (elt unload-hook-features-list)
(when (symbolp elt)
(elp-restore-function elt))))
+
(dolist (x unload-hook-features-list)
(if (consp x)
(case (car x)
@@ -221,10 +225,14 @@
(when (fboundp 'ad-unadvise)
(ad-unadvise fun))
(let ((aload (get fun 'autoload)))
- (if aload
+ (if (and aload (eq fun restore-autoload))
(fset fun (cons 'autoload aload))
(fmakunbound fun))))))
- ((t require defface) nil)
+ ;; (t . SYMBOL) comes before (defun . SYMBOL)
+ ;; and says we should restore SYMBOL's autoload
+ ;; when we undefine it.
+ ((t) (setq restore-autoload (cdr x)))
+ ((require defface) nil)
(t (message "Unexpected element %s in load-history" x)))
;; Kill local values as much as possible.
(dolist (buf (buffer-list))