Subject: bug#40464: 28.0.50; auctex 12.2.0 LaTeX-caption-keyval-options void

From: Arash Esbati <[email-masked]>
Date: Mon, 06 Apr 2020 23:51:21 +0200

Hi Pierre,

"Pierre L. Nageoire" <[email-masked]> writes:

> In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu)
>  of 2020-03-07 built on jabberwocky
>
>
> Hi,
>
> When starting filling a document with C-c C-e first answering document,
> then article and some options ; at first ask for a package I answerd
> subcaption and get following error :
>
> Symbol's value as variable is void: LaTeX-caption-key-val-options
>
> even if I see in the messages buffer that subcaption.elc is loaded In
> fact the (defvar LaTeX-....) does not seem to be sufficient. Replacing
> it by (defvar LaTeX-... nil) it works perfectly.
>
> Something that was accepted by previous version of emacs and are no
> longer ? Or something like that ?

Thanks for reporting this issue.  This is a shortcoming in AUCTeX's
subcaption.el which I've just fixed[1].  For the time being, you can
explicitly request for caption package before subcaption, i.e.

    C-c C-e article RET RET caption RET RET subcaption RET

Best, Arash

Footnotes:
[1]  http://git.savannah.gnu.org/cgit/auctex.git/commit/?id=54cb9c0548205263a6b4c4d49e60c8079f43ee3d