aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-11 14:24:22 +0000
committerGerd Moellmann2001-01-11 14:24:22 +0000
commit50ca4be0b9764baaa8bf0f49ba02b6b638053d7d (patch)
tree3d13b4cd5dcd7214a10eb81b6d7df8af3bee2082
parent422717d17bf62d24e977ce728fe9d50abaa96a13 (diff)
downloademacs-50ca4be0b9764baaa8bf0f49ba02b6b638053d7d.tar.gz
emacs-50ca4be0b9764baaa8bf0f49ba02b6b638053d7d.zip
(load-symbol-file-load-history): New function extracted
from function symbol-file. (symbol-file): Use it.
-rw-r--r--lisp/help.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 935b3c05bf9..982d007676d 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -569,12 +569,10 @@ If that doesn't give a function, return nil."
569That file records the part of `load-history' for preloaded files, 569That file records the part of `load-history' for preloaded files,
570which is cleared out before dumping to make Emacs smaller.") 570which is cleared out before dumping to make Emacs smaller.")
571 571
572(defun symbol-file (function) 572(defun load-symbol-file-load-history ()
573 "Return the input source from which FUNCTION was loaded. 573 "Load the file `fns-VERSION.el' in `exec-directory' if not already done.
574The value is normally a string that was passed to `load': 574That file records the part of `load-history' for preloaded files,
575either an absolute file name, or a library name 575which is cleared out before dumping to make Emacs smaller."
576\(with no directory name and no `.el' or `.elc' at the end).
577It can also be nil, if the definition is not associated with any file."
578 (unless symbol-file-load-history-loaded 576 (unless symbol-file-load-history-loaded
579 (load (expand-file-name 577 (load (expand-file-name
580 ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. 578 ;; fns-XX.YY.ZZ.el does not work on DOS filesystem.
@@ -584,7 +582,15 @@ It can also be nil, if the definition is not associated with any file."
584 exec-directory) 582 exec-directory)
585 ;; The file name fns-%s.el already has a .el extension. 583 ;; The file name fns-%s.el already has a .el extension.
586 nil nil t) 584 nil nil t)
587 (setq symbol-file-load-history-loaded t)) 585 (setq symbol-file-load-history-loaded t)))
586
587(defun symbol-file (function)
588 "Return the input source from which FUNCTION was loaded.
589The value is normally a string that was passed to `load':
590either an absolute file name, or a library name
591\(with no directory name and no `.el' or `.elc' at the end).
592It can also be nil, if the definition is not associated with any file."
593 (load-symbol-file-load-history)
588 (let ((files load-history) 594 (let ((files load-history)
589 file functions) 595 file functions)
590 (while files 596 (while files