Function: helpful--autoloaded-p

helpful--autoloaded-p is a byte-compiled function defined in helpful.el.

Signature

(helpful--autoloaded-p SYM BUF)

Documentation

Return non-nil if function SYM is autoloaded.

Source Code

;; Defined in ~/.emacs.d/elpa/helpful-20250408.334/helpful.el
;; TODO: this only reports if a function is autoloaded because we
;; autoloaded it. This ignores newly defined functions that are
;; autoloaded. Built-in help has this limitation too, but if we can
;; find the source, we should instead see if there's an autoload
;; cookie.
(defun helpful--autoloaded-p (sym buf)
  "Return non-nil if function SYM is autoloaded."
  (-when-let (file-name (buffer-file-name buf))
    (setq file-name (s-chop-suffix ".gz" file-name))
    (condition-case nil
        (help-fns--autoloaded-p sym file-name)
      ; new in Emacs 29.0.50
      ; see https://github.com/Wilfred/helpful/pull/283
      (error (help-fns--autoloaded-p sym)))))