Index: lisp/help-fns.el *** lisp/help-fns.el.~1.96.~ 2007-01-24 20:52:15.000000000 +0100 --- lisp/help-fns.el 2007-05-17 16:23:46.000000000 +0200 *************** *** 232,237 **** --- 232,250 ---- libname) file)))) + (defun find-source-lisp-file (file-name) + (let* ((elc-file (locate-file (concat file-name "c") load-path)) + (str (if (and elc-file (file-readable-p elc-file)) + (with-temp-buffer + (insert-file-contents elc-file nil 0 256) + (buffer-string)))) + (src-file (and str + (string-match ";;; from file \\(.*\\.el\\)" str) + (match-string 1 str)))) + (if (and src-file (file-readable-p src-file)) + src-file + file-name))) + ;;;###autoload (defun describe-function-1 (function) (let* ((def (if (symbolp function) *************** *** 309,314 **** --- 322,331 ---- ;; but that's completely wrong when the user used load-file. (princ (if (eq file-name 'C-source) "C source code" file-name)) (princ "'") + ;; See if lisp files are present where they where installed from. + (if (not (eq file-name 'C-source)) + (setq file-name (find-source-lisp-file file-name))) + ;; Make a hyperlink to the library. (with-current-buffer standard-output (save-excursion