# HG changeset patch # User Karl Heuer # Date 913260333 0 # Node ID e9fe8ed71303a461449e11e934143e837242d6d3 # Parent dc812cd8bd1b8487f4aa782c904078860da09b87 (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. diff -r dc812cd8bd1b -r e9fe8ed71303 lisp/help.el --- a/lisp/help.el Thu Dec 10 03:25:15 1998 +0000 +++ b/lisp/help.el Thu Dec 10 03:25:33 1998 +0000 @@ -541,7 +541,27 @@ (error nil))) (set-syntax-table stab)))) -(defun describe-function-find-file (function) +(defvar symbol-file-load-history-loaded nil + "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. +That file records the part of `load-history' for preloaded files, +which is cleared out before dumping to make Emacs smaller.") + +(defun symbol-file (function) + "Return the input source from which SYM was loaded. +The value is normally a string that was passed to `load': +either an absolute file name, or a library name +\(with no directory name and no `.el' or `.elc' at the end). +It can also be nil, if the definition is not associated with any file." + (unless symbol-file-load-history-loaded + (load (expand-file-name + ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. + (if (eq system-type 'ms-dos) + "fns.el" + (format "fns-%s.el" emacs-version)) + exec-directory) + ;; The file name fns-%s.el already has a .el extension. + nil nil t) + (setq symbol-file-load-history-loaded t)) (let ((files load-history) file functions) (while files @@ -610,7 +630,7 @@ (princ "(")) (princ string) (or file-name - (setq file-name (describe-function-find-file function))) + (setq file-name (symbol-file function))) (if file-name (progn (princ " in `") @@ -749,7 +769,7 @@ ;; Make a hyperlink to the library if appropriate. (Don't ;; change the format of the buffer's initial line in case ;; anything expects the current format.) - (let ((file-name (describe-function-find-file variable))) + (let ((file-name (symbol-file variable))) (when file-name (princ "\n\nDefined in `") (princ file-name)