Mercurial > emacs
comparison lisp/subr.el @ 47015:7faae7c35e07
(symbol-file-load-history-loaded)
(load-symbol-file-load-history): Deleted.
(symbol-file): Don't call load-symbol-file-load-history.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 24 Aug 2002 02:58:53 +0000 |
parents | a4e9eb2530cb |
children | 324b87cc6fdf |
comparison
equal
deleted
inserted
replaced
47014:39b2e060a7f0 | 47015:7faae7c35e07 |
---|---|
890 (cons element (symbol-value list-var)))))) | 890 (cons element (symbol-value list-var)))))) |
891 | 891 |
892 | 892 |
893 ;;; Load history | 893 ;;; Load history |
894 | 894 |
895 (defvar symbol-file-load-history-loaded nil | 895 ;;; (defvar symbol-file-load-history-loaded nil |
896 "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. | 896 ;;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. |
897 That file records the part of `load-history' for preloaded files, | 897 ;;; That file records the part of `load-history' for preloaded files, |
898 which is cleared out before dumping to make Emacs smaller.") | 898 ;;; which is cleared out before dumping to make Emacs smaller.") |
899 | 899 |
900 (defun load-symbol-file-load-history () | 900 ;;; (defun load-symbol-file-load-history () |
901 "Load the file `fns-VERSION.el' in `exec-directory' if not already done. | 901 ;;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done. |
902 That file records the part of `load-history' for preloaded files, | 902 ;;; That file records the part of `load-history' for preloaded files, |
903 which is cleared out before dumping to make Emacs smaller." | 903 ;;; which is cleared out before dumping to make Emacs smaller." |
904 (unless symbol-file-load-history-loaded | 904 ;;; (unless symbol-file-load-history-loaded |
905 (load (expand-file-name | 905 ;;; (load (expand-file-name |
906 ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. | 906 ;;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. |
907 (if (eq system-type 'ms-dos) | 907 ;;; (if (eq system-type 'ms-dos) |
908 "fns.el" | 908 ;;; "fns.el" |
909 (format "fns-%s.el" emacs-version)) | 909 ;;; (format "fns-%s.el" emacs-version)) |
910 exec-directory) | 910 ;;; exec-directory) |
911 ;; The file name fns-%s.el already has a .el extension. | 911 ;;; ;; The file name fns-%s.el already has a .el extension. |
912 nil nil t) | 912 ;;; nil nil t) |
913 (setq symbol-file-load-history-loaded t))) | 913 ;;; (setq symbol-file-load-history-loaded t))) |
914 | 914 |
915 (defun symbol-file (function) | 915 (defun symbol-file (function) |
916 "Return the input source from which FUNCTION was loaded. | 916 "Return the input source from which FUNCTION was loaded. |
917 The value is normally a string that was passed to `load': | 917 The value is normally a string that was passed to `load': |
918 either an absolute file name, or a library name | 918 either an absolute file name, or a library name |
919 \(with no directory name and no `.el' or `.elc' at the end). | 919 \(with no directory name and no `.el' or `.elc' at the end). |
920 It can also be nil, if the definition is not associated with any file." | 920 It can also be nil, if the definition is not associated with any file." |
921 (load-symbol-file-load-history) | 921 ;;; (load-symbol-file-load-history) |
922 (let ((files load-history) | 922 (let ((files load-history) |
923 file functions) | 923 file functions) |
924 (while files | 924 (while files |
925 (if (memq function (cdr (car files))) | 925 (if (memq function (cdr (car files))) |
926 (setq file (car (car files)) files nil)) | 926 (setq file (car (car files)) files nil)) |