comparison lisp/help-fns.el @ 59125:32d2da4da4de

(describe-function-1): Call symbol-file with `defun'. (describe-variable): Call symbol-file with `defvar'.
author Richard M. Stallman <rms@gnu.org>
date Mon, 27 Dec 2004 16:24:20 +0000
parents 99a7590b2736
children 658501d06a20 95879cc1ed20
comparison
equal deleted inserted replaced
59124:f38536b30f3a 59125:32d2da4da4de
353 (save-excursion 353 (save-excursion
354 (save-match-data 354 (save-match-data
355 (if (re-search-backward "alias for `\\([^`']+\\)'" nil t) 355 (if (re-search-backward "alias for `\\([^`']+\\)'" nil t)
356 (help-xref-button 1 'help-function def))))) 356 (help-xref-button 1 'help-function def)))))
357 (or file-name 357 (or file-name
358 (setq file-name (symbol-file function))) 358 (setq file-name (symbol-file function 'defun)))
359 (when (equal file-name "loaddefs.el") 359 (when (equal file-name "loaddefs.el")
360 ;; Find the real def site of the preloaded function. 360 ;; Find the real def site of the preloaded function.
361 ;; This is necessary only for defaliases. 361 ;; This is necessary only for defaliases.
362 (let ((location 362 (let ((location
363 (condition-case nil 363 (condition-case nil
612 (concat "\\(" customize-label "\\)") nil t) 612 (concat "\\(" customize-label "\\)") nil t)
613 (help-xref-button 1 'help-customize-variable variable))))) 613 (help-xref-button 1 'help-customize-variable variable)))))
614 ;; Make a hyperlink to the library if appropriate. (Don't 614 ;; Make a hyperlink to the library if appropriate. (Don't
615 ;; change the format of the buffer's initial line in case 615 ;; change the format of the buffer's initial line in case
616 ;; anything expects the current format.) 616 ;; anything expects the current format.)
617 (let ((file-name (symbol-file (cons 'defvar variable)))) 617 (let ((file-name (symbol-file variable 'defvar)))
618 (when (equal file-name "loaddefs.el") 618 (when (equal file-name "loaddefs.el")
619 ;; Find the real def site of the preloaded variable. 619 ;; Find the real def site of the preloaded variable.
620 (let ((location 620 (let ((location
621 (condition-case nil 621 (condition-case nil
622 (find-variable-noselect variable file-name) 622 (find-variable-noselect variable file-name)