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: Lute Kamstra
Subject: [Emacs-diffs] Changes to emacs/lisp/loadhist.el
Date: Thu, 21 Apr 2005 17:36:25 -0400

Index: emacs/lisp/loadhist.el
diff -c emacs/lisp/loadhist.el:1.32 emacs/lisp/loadhist.el:1.33
*** emacs/lisp/loadhist.el:1.32 Tue Apr 19 15:08:05 2005
--- emacs/lisp/loadhist.el      Thu Apr 21 21:36:24 2005
***************
*** 188,214 ****
                             (string-match "-hooks?\\'" (symbol-name x)))
                        (memq x unload-feature-special-hooks))) ; Known 
abnormal hooks etc.
           (dolist (y unload-hook-features-list)
!            (when (eq (car-safe y) 'defun)
!              (remove-hook x (cdr y))))))))
      (when (fboundp 'elp-restore-function) ; remove ELP stuff first
        (dolist (elt unload-hook-features-list)
        (when (symbolp elt)
          (elp-restore-function elt))))
      (dolist (x unload-hook-features-list)
        (if (consp x)
!         (progn
!           ;; Remove any feature names that this file provided.
!           (when (eq (car x) 'provide)
!             (setq features (delq (cdr x) features)))
!           (when (eq (car x) '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))))))))
        ;; Kill local values as much as possible.
        (dolist (buf (buffer-list))
          (with-current-buffer buf
--- 188,221 ----
                             (string-match "-hooks?\\'" (symbol-name x)))
                        (memq x unload-feature-special-hooks))) ; Known 
abnormal hooks etc.
           (dolist (y unload-hook-features-list)
!            (when (and (eq (car-safe y) 'defun)
!                       (not (get (cdr y) 'autoload)))
!              (remove-hook x (cdr y)))))))
!       ;; Remove any feature-symbols from auto-mode-alist as well.
!       (dolist (y unload-hook-features-list)
!       (when (and (eq (car-safe y) 'defun)
!                  (not (get (cdr y) 'autoload)))
!         (setq auto-mode-alist
!               (rassq-delete-all (cdr y) auto-mode-alist)))))
      (when (fboundp 'elp-restore-function) ; remove ELP stuff first
        (dolist (elt unload-hook-features-list)
        (when (symbolp elt)
          (elp-restore-function elt))))
      (dolist (x unload-hook-features-list)
        (if (consp x)
!         (cond
!          ;; Remove any feature names that this file provided.
!          ((eq (car x) 'provide)
!           (setq features (delq (cdr x) features)))
!          ((eq (car x) '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))))))))
        ;; Kill local values as much as possible.
        (dolist (buf (buffer-list))
          (with-current-buffer buf
***************
*** 217,224 ****
        (unless (local-variable-if-set-p x)
          (makunbound x))))
      ;; Delete the load-history element for this file.
!     (let ((elt (assoc file load-history)))
!       (setq load-history (delq elt load-history)))))
  
  (provide 'loadhist)
  
--- 224,230 ----
        (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))))
  
  (provide 'loadhist)
  




reply via email to

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