Explanation: In version 11.87,
TeX-auto-add-type was a function. In version 11.88 (since commit f4d3f2840e8f448a329b223c081bce556eb6ca67,
TeX-auto-add-type became a macro. My understanding is that during the installation of the newer version in a live Emacs, the function was loaded, and the byte compiler picked up the function. After restarting Emacs, there was no function, only a macro, but the bytecode refered to the function, hence the error. It's unclear to me whether this is due to a bug in AUCTeX or a lack of robustness in byte compilation in Emacs in general.
Fix: to recompile the bytecode now that the function is no longer present in memory. This can be done by uninstalling the
auctex package and reinstalling. Alternatively, remove the bytecode files
~/.emacs.d/elpa/auctex-11.89.1/*.elc (adjust for your AUCTeX version) (open the directory in Dired,
% m \.elc RET D yes RET) and recompile them (
M-0 M-x byte-recompile-directory — you need the prefix argument 0 to recompile all the files even though the no
.elc file is present).
Note: This problem can be avoided by not performing the package installation in a live Emacs, but in a dedicated instance. Generally speaking, performing package installations in an instance of Emacs just for that task is safer.