]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-function-1): Save precomputed `file-name' rather
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 4 Sep 2001 01:06:43 +0000 (01:06 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 4 Sep 2001 01:06:43 +0000 (01:06 +0000)
than recomputing it (incorrectly) with `symbol-file'.

lisp/help.el

index c379fba137309c73fc9aefa2d50313f1598a0a0b..c05fcb4749020642c8daea96e46424f03baf0158 100644 (file)
@@ -710,15 +710,17 @@ It can also be nil, if the definition is not associated with any file."
          (with-current-buffer "*Help*"
            (save-excursion
              (re-search-backward "`\\([^`']+\\)'" nil t)
-             (help-xref-button 
-              1 
-              #'(lambda (arg)
+             (help-xref-button
+              1
+              #'(lambda (fun file)
                   (require 'find-func)
+                  ;; Don't use find-function-noselect because it follows
+                  ;; aliases (which fails for built-in functions).
                   (let* ((location (find-function-search-for-symbol
-                                    arg nil (symbol-file arg))))
+                                    fun nil file)))
                     (pop-to-buffer (car location))
                     (goto-char (cdr location))))
-              function
+              (list function file-name)
               "mouse-2, RET: find function's definition")))))
     (if need-close (princ ")"))
     (princ ".")