Function: helpful--forget

helpful--forget is a byte-compiled function defined in helpful.el.

Signature

(helpful--forget BUTTON)

Documentation

Unbind the current symbol.

Source Code

;; Defined in ~/.emacs.d/elpa/helpful-20250408.334/helpful.el
;; TODO: it would be nice to optionally delete the source code too.
(defun helpful--forget (button)
  "Unbind the current symbol."
  (let* ((sym (button-get button 'symbol))
         (callable-p (button-get button 'callable-p))
         (kind (helpful--kind-name sym callable-p)))
    (when (yes-or-no-p (format "Forget %s %s?" kind sym))
      (if callable-p
          (fmakunbound sym)
        (makunbound sym))
      (message "Forgot %s %s." kind sym)
      (kill-buffer (current-buffer)))))