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: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/loadhist.el
Date: Fri, 21 Oct 2005 13:19:10 -0400

Index: emacs/lisp/loadhist.el
diff -c emacs/lisp/loadhist.el:1.35 emacs/lisp/loadhist.el:1.36
*** emacs/lisp/loadhist.el:1.35 Sat Aug  6 22:13:43 2005
--- emacs/lisp/loadhist.el      Fri Oct 21 17:19:10 2005
***************
*** 53,76 ****
      (car (feature-symbols feature))))
  
  (defun file-loadhist-lookup (file)
!   "Return the `load-history' element for FILE."
    ;; First look for FILE as given.
    (let ((symbols (assoc file load-history)))
      ;; Try converting a library name to an absolute file name.
      (and (null symbols)
!        (let ((absname (find-library-name file)))
!          (if (not (equal absname file))
!              (setq symbols (cdr (assoc absname load-history))))))
!     ;; Try converting an absolute file name to a library name.
!     (and (null symbols) (string-match "[.]el\\'" file)
!        (let ((libname (file-name-nondirectory file)))
!          (string-match "[.]el\\'" libname)
!          (setq libname (substring libname 0 (match-beginning 0)))
!          (setq symbols (cdr (assoc libname load-history)))))
      symbols))
  
  (defun file-provides (file)
!   "Return the list of features provided by FILE."
    (let ((symbols (file-loadhist-lookup file))
        provides)
      (mapc (lambda (x)
--- 53,75 ----
      (car (feature-symbols feature))))
  
  (defun file-loadhist-lookup (file)
!   "Return the `load-history' element for FILE.
! FILE can be a file name, or a library name.
! A library name is equivalent to the file name that `load-library' would load."
    ;; First look for FILE as given.
    (let ((symbols (assoc file load-history)))
      ;; Try converting a library name to an absolute file name.
      (and (null symbols)
!        (let ((absname 
!               (locate-file file load-path load-suffixes)))
!          (and absname (not (equal absname file))
!               (setq symbols (cdr (assoc absname load-history))))))
      symbols))
  
  (defun file-provides (file)
!   "Return the list of features provided by FILE as it was loaded.
! FILE can be a file name, or a library name.
! A library name is equivalent to the file name that `load-library' would load."
    (let ((symbols (file-loadhist-lookup file))
        provides)
      (mapc (lambda (x)
***************
*** 80,86 ****
      provides))
  
  (defun file-requires (file)
!   "Return the list of features required by FILE."
    (let ((symbols (file-loadhist-lookup file))
        requires)
      (mapc (lambda (x)
--- 79,87 ----
      provides))
  
  (defun file-requires (file)
!   "Return the list of features required by FILE as it was loaded.
! FILE can be a file name, or a library name.
! A library name is equivalent to the file name that `load-library' would load."
    (let ((symbols (file-loadhist-lookup file))
        requires)
      (mapc (lambda (x)
***************
*** 98,104 ****
  
  (defun file-dependents (file)
    "Return the list of loaded libraries that depend on FILE.
! This can include FILE itself."
    (let ((provides (file-provides file))
        (dependents nil))
      (dolist (x load-history dependents)
--- 99,107 ----
  
  (defun file-dependents (file)
    "Return the list of loaded libraries that depend on FILE.
! This can include FILE itself.
! FILE can be a file name, or a library name.
! A library name is equivalent to the file name that `load-library' would load."
    (let ((provides (file-provides file))
        (dependents nil))
      (dolist (x load-history dependents)




reply via email to

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