emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/loadhist.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/loadhist.el
Date: Tue, 11 Apr 2006 17:05:17 +0000

Index: emacs/lisp/loadhist.el
diff -u emacs/lisp/loadhist.el:1.38 emacs/lisp/loadhist.el:1.39
--- emacs/lisp/loadhist.el:1.38 Mon Feb 27 01:54:42 2006
+++ emacs/lisp/loadhist.el      Tue Apr 11 17:05:16 2006
@@ -32,6 +32,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (defun feature-symbols (feature)
   "Return the file and list of definitions associated with FEATURE.
 The value is actually the element of `load-history'
@@ -207,23 +209,29 @@
          (elp-restore-function elt))))
     (dolist (x unload-hook-features-list)
       (if (consp x)
-         (cond
+         (case (car x)
           ;; Remove any feature names that this file provided.
-          ((eq (car x) 'provide)
+          (provide
            (setq features (delq (cdr x) features)))
-          ((eq (car x) 'defun)
+          (defun
            (let ((fun (cdr x)))
              (when (fboundp fun)
                (when (fboundp 'ad-unadvise)
                  (ad-unadvise fun))
-               (fmakunbound fun)
                (let ((aload (get fun 'autoload)))
-                 (when aload
-                   (fset fun (cons 'autoload aload))))))))
+                 (if aload
+                      (fset fun (cons 'autoload aload))
+                    (fmakunbound fun))))))
+           (require nil)
+           (t (message "Unexpected element %s in load-history" x)))
        ;; Kill local values as much as possible.
        (dolist (buf (buffer-list))
          (with-current-buffer buf
+            (if (and (boundp x) (timerp (symbol-value x)))
+                (cancel-timer (symbol-value x)))
            (kill-local-variable x)))
+        (if (and (boundp x) (timerp (symbol-value x)))
+            (cancel-timer (symbol-value x)))
        ;; Get rid of the default binding if we can.
        (unless (local-variable-if-set-p x)
          (makunbound x))))
@@ -232,5 +240,5 @@
 
 (provide 'loadhist)
 
-;;; arch-tag: 70bb846a-c413-4f01-bf88-78dba4ac0798
+;; arch-tag: 70bb846a-c413-4f01-bf88-78dba4ac0798
 ;;; loadhist.el ends here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]