Function: help-function-def--button-function
help-function-def--button-function is a byte-compiled function defined
in help-mode.el.gz.
Signature
(help-function-def--button-function FUN &optional FILE TYPE)
Source Code
;; Defined in /usr/src/emacs/lisp/help-mode.el.gz
(defun help-function-def--button-function (fun &optional file type)
(or file
(setq file (find-lisp-object-file-name fun type)))
(if (not file)
(message "Unable to find defining file")
(require 'find-func)
(when (eq file 'C-source)
(setq file
(help-C-file-name (indirect-function fun) 'fun)))
;; Don't use find-function-noselect because it follows
;; aliases (which fails for built-in functions).
(let* ((location
(find-function-search-for-symbol fun type file))
(position (cdr location)))
(pop-to-buffer (car location))
(run-hooks 'find-function-after-hook)
(if position
(progn
;; Widen the buffer if necessary to go to this position.
(when (or (< position (point-min))
(> position (point-max)))
(widen))
(goto-char position))
(message "Unable to find location in file")))))