auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUCTeX 14.0.0 in ELPA


From: Tassilo Horn
Subject: Re: AUCTeX 14.0.0 in ELPA
Date: Fri, 09 Feb 2024 14:11:39 +0100
User-agent: mu4e 1.11.28; emacs 30.0.50

Ikumi Keita <ikumi@ikumi.que.jp> writes:

Hi Keita,

> I wrote the relevant portion of tex-site.el.in assuming that various
> autoloads in tex-site.el, including the one for `LaTeX-mode', _follows_
> the parts generated from tex-site.el.in. This holds for configure-make
> installation scheme. However, it seems that the order is reversed in
> ELPA installation scheme; In ELPA installation,
> [1] tex-site.el contains no autoload declarations; there are only parts
>     generated from tex-site.el.in.
> [2] auctex-autoloads.el, which doesn't exist in configure-make
>     installation, contains
> ----------------------------------------------------------------------
> ;;; Generated autoloads from tex-site.el
>
>  (require 'tex-site)
> ----------------------------------------------------------------------
>     _after_ the autoload declaration of `LaTeX-mode'.
>
> I assumed that the following code in tex-site.el(.in) runs _before_
> AUCTeX autoload declaration for LaTeX-mode in order to eliminate the
> alias predefined by tex-mode.el:
> ----------------------------------------------------------------------
> ;; Delete aliases predefined in tex-mode.el so that AUCTeX
> ;; autoloads provided below take precedence.
> (TeX--alias-overlapped-modes)
> ----------------------------------------------------------------------
> In ELPA installation, the autoload for LaTeX-mode provided by AUCTeX goes
> without this elimination and have no effect because elisp function
> `autoload' doesn't overwrite existing alias. In addition, in the
> subsequent loading of tex-site.el, the above code eliminates that
> alias, hence leading to (void-function LaTeX-mode) when opening a
> LaTeX file.
>
> When I moved
> ----------------------------------------------------------------------
> ;;; Generated autoloads from tex-site.el
>
>  (require 'tex-site)
> ----------------------------------------------------------------------
> to the early stage in auctex-autoloads.el and restarted emacs session,
> everything works fine. Thus I think that my above consideration is
> right.
>
> Is there any simple way in ELPA installation scheme to sort out the
> order of autoload declaration and (require 'tex-site)?

Too bad.  It seems the autoloads are simply appended in alphabetical
order of filenames so tex-site comes pretty late...

I checked the ELPA README.  It is possible to run a shell command to
build the package (in addition or instead (?) of "make").  So maybe we
can temporarily fix it by adding a shell command that prepends

  (require 'tex-site)

to auctex-autoloads.el?

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]