Function: TeX--if-macro-fboundp
TeX--if-macro-fboundp is a macro defined in tex.el.
Signature
(TeX--if-macro-fboundp NAME THEN &rest ELSE)
Documentation
Execute THEN if macro NAME is bound and ELSE otherwise.
Essentially,
(TeX--if-macro-fboundp name then else...)
is equivalent to
(if (fboundp 'name) then else...)
but takes care of byte-compilation issues where the byte-code for the latter could signal an error if it has been compiled with emacs 24.1 and is then later run by emacs 24.5.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
;;; Portability.
(defmacro TeX--if-macro-fboundp (name then &rest else)
"Execute THEN if macro NAME is bound and ELSE otherwise.
Essentially,
(TeX--if-macro-fboundp name then else...)
is equivalent to
(if (fboundp \\='name) then else...)
but takes care of byte-compilation issues where the byte-code for
the latter could signal an error if it has been compiled with
emacs 24.1 and is then later run by emacs 24.5."
(declare (indent 2) (debug (symbolp form &rest form)))
(if (fboundp name) ;If macro exists at compile-time, just use it.
then
`(if (fboundp ',name) ;Else, check if it exists at run-time.
(eval ',then) ;If it does, then run the then code.
,@else))) ;Otherwise, run the else code.