This page shows you how to check if a {function, variable} is defined, or if a “feature” is loaded, and find out what Operating System your emacs is running on.
Check if a function is defined.
;; check if a function is defined (fboundp 'info) ; t (fboundp 'setq) ; t (fboundp 'xyz) ; nil
Check if a variable is defined.
;; check if a variable is defined (boundp 'auto-mode-alist) ; t (boundp 'default-input-method) ; t (boundp 'nil) ; t (boundp 'xyz) ; nil
The fboundp actually check a symbol's function cell. Similarly, the boundp checks a symbol's value cell.
〔☛ Emacs Lisp Symbol〕
Check if a “feature” is loaded.
;; check if a “feature” (package) has been loaded (featurep 'expand-region)
〔☛ Emacs Lisp's Library System: What's require, load, load-file, autoload, feature?〕
See also: Emacs Lisp: Find/Determine OS and Emacs Version.