Is that function autoloaded yet?


Our lab rat today is the builtin ido package. It has a command ido-mode, autoloaded on demand. Now assuming you have not loaded it, check out the return values:

(featurep 'ido)  ;; => nil
(fboundp 'ido-mode) ;; => t
(autoloadp (symbol-function 'ido-mode)) ;; => t

Then we do M-x load-library ido RET, and see how the return values change.

(featurep 'ido)  ;; => t
(fboundp 'ido-mode) ;; => t
(autoloadp (symbol-function 'ido-mode)) ;; => nil

TL;DR: to check if ido exists, it's safest to use fboundp on one of its functions.

Created (2 months ago)