Function: backtrace-help-follow-symbol

backtrace-help-follow-symbol is an interactive and byte-compiled function defined in backtrace.el.gz.

Signature

(backtrace-help-follow-symbol &optional POS)

Documentation

Follow cross-reference at POS, defaulting to point.

For the cross-reference format, see help-make-xrefs.

Key Bindings

Aliases

debug-help-follow (obsolete since 28.1)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/backtrace.el.gz
(defun backtrace-help-follow-symbol (&optional pos)
  "Follow cross-reference at POS, defaulting to point.
For the cross-reference format, see `help-make-xrefs'."
  (interactive "d")
  (unless pos
    (setq pos (point)))
  (unless (push-button pos)
    ;; Check if the symbol under point is a function or variable.
    (let ((sym
	   (intern
	    (save-excursion
	      (goto-char pos) (skip-syntax-backward "w_")
	      (buffer-substring (point)
				(progn (skip-syntax-forward "w_")
				       (point)))))))
      (when (or (boundp sym) (fboundp sym) (facep sym))
        (describe-symbol sym)))))