diff options
| author | Karl Heuer | 1998-12-10 03:25:33 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-12-10 03:25:33 +0000 |
| commit | 0f619a41267085b1efdad90a019f600ba37e6a32 (patch) | |
| tree | 1e1a973726fff4b27b71240bb01f06c377ce39c3 | |
| parent | e88b8369a672de0477aa45252fb4341bf45d910b (diff) | |
| download | emacs-0f619a41267085b1efdad90a019f600ba37e6a32.tar.gz emacs-0f619a41267085b1efdad90a019f600ba37e6a32.zip | |
(symbol-file-load-history-loaded): Variable renamed,
and defvar moved from loadhist.el.
(symbol-file): Renamed from describe-function-find-file.
Load fns-VERSION.el here.
(describe-variable, describe-function-1): Use symbol-file.
| -rw-r--r-- | lisp/help.el | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/lisp/help.el b/lisp/help.el index 1347fdf1abf..ddc67c43432 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -541,7 +541,27 @@ C-w Display information on absence of warranty for GNU Emacs." | |||
| 541 | (error nil))) | 541 | (error nil))) |
| 542 | (set-syntax-table stab)))) | 542 | (set-syntax-table stab)))) |
| 543 | 543 | ||
| 544 | (defun describe-function-find-file (function) | 544 | (defvar symbol-file-load-history-loaded nil |
| 545 | "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. | ||
| 546 | That file records the part of `load-history' for preloaded files, | ||
| 547 | which is cleared out before dumping to make Emacs smaller.") | ||
| 548 | |||
| 549 | (defun symbol-file (function) | ||
| 550 | "Return the input source from which SYM was loaded. | ||
| 551 | The value is normally a string that was passed to `load': | ||
| 552 | either an absolute file name, or a library name | ||
| 553 | \(with no directory name and no `.el' or `.elc' at the end). | ||
| 554 | It can also be nil, if the definition is not associated with any file." | ||
| 555 | (unless symbol-file-load-history-loaded | ||
| 556 | (load (expand-file-name | ||
| 557 | ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. | ||
| 558 | (if (eq system-type 'ms-dos) | ||
| 559 | "fns.el" | ||
| 560 | (format "fns-%s.el" emacs-version)) | ||
| 561 | exec-directory) | ||
| 562 | ;; The file name fns-%s.el already has a .el extension. | ||
| 563 | nil nil t) | ||
| 564 | (setq symbol-file-load-history-loaded t)) | ||
| 545 | (let ((files load-history) | 565 | (let ((files load-history) |
| 546 | file functions) | 566 | file functions) |
| 547 | (while files | 567 | (while files |
| @@ -610,7 +630,7 @@ C-w Display information on absence of warranty for GNU Emacs." | |||
| 610 | (princ "(")) | 630 | (princ "(")) |
| 611 | (princ string) | 631 | (princ string) |
| 612 | (or file-name | 632 | (or file-name |
| 613 | (setq file-name (describe-function-find-file function))) | 633 | (setq file-name (symbol-file function))) |
| 614 | (if file-name | 634 | (if file-name |
| 615 | (progn | 635 | (progn |
| 616 | (princ " in `") | 636 | (princ " in `") |
| @@ -749,7 +769,7 @@ Returns the documentation as a string, also." | |||
| 749 | ;; Make a hyperlink to the library if appropriate. (Don't | 769 | ;; Make a hyperlink to the library if appropriate. (Don't |
| 750 | ;; change the format of the buffer's initial line in case | 770 | ;; change the format of the buffer's initial line in case |
| 751 | ;; anything expects the current format.) | 771 | ;; anything expects the current format.) |
| 752 | (let ((file-name (describe-function-find-file variable))) | 772 | (let ((file-name (symbol-file variable))) |
| 753 | (when file-name | 773 | (when file-name |
| 754 | (princ "\n\nDefined in `") | 774 | (princ "\n\nDefined in `") |
| 755 | (princ file-name) | 775 | (princ file-name) |