diff options
| author | Gerd Moellmann | 2001-01-11 14:24:22 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-01-11 14:24:22 +0000 |
| commit | 50ca4be0b9764baaa8bf0f49ba02b6b638053d7d (patch) | |
| tree | 3d13b4cd5dcd7214a10eb81b6d7df8af3bee2082 | |
| parent | 422717d17bf62d24e977ce728fe9d50abaa96a13 (diff) | |
| download | emacs-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.el | 20 |
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." | |||
| 569 | That file records the part of `load-history' for preloaded files, | 569 | That file records the part of `load-history' for preloaded files, |
| 570 | which is cleared out before dumping to make Emacs smaller.") | 570 | which 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. |
| 574 | The value is normally a string that was passed to `load': | 574 | That file records the part of `load-history' for preloaded files, |
| 575 | either an absolute file name, or a library name | 575 | which is cleared out before dumping to make Emacs smaller." |
| 576 | \(with no directory name and no `.el' or `.elc' at the end). | ||
| 577 | It 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. | ||
| 589 | The value is normally a string that was passed to `load': | ||
| 590 | either an absolute file name, or a library name | ||
| 591 | \(with no directory name and no `.el' or `.elc' at the end). | ||
| 592 | It 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 |