Function: helpful--switch-to-buffer

helpful--switch-to-buffer is a natively compiled function defined in helpful.el.

Signature

(helpful--switch-to-buffer BUTTON)

Documentation

Navigate to the buffer this BUTTON represents.

Source Code

;; Defined in /nix/store/mvfc1hll8a1f23ivm3qmzj4bn64jr3x7-emacs-packages-deps/share/emacs/site-lisp/elpa/helpful-20250408.334/helpful.el
(defun helpful--switch-to-buffer (button)
  "Navigate to the buffer this BUTTON represents."
  (let ((buf (button-get button 'buffer))
        (pos (button-get button 'position)))
    (switch-to-buffer buf)
    (when pos
      (helpful--goto-char-widen pos))))