[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Hooks for LaTeX-arg-usepackage and TeX-arg-document
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX-devel] Hooks for LaTeX-arg-usepackage and TeX-arg-document |
Date: |
Mon, 10 Jun 2013 08:33:29 +0200 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
Mosè Giordano <address@hidden> writes:
Hi Mosè,
> the attached patch adds hooks for `LaTeX-arg-usepackage' and
> `TeX-arg-document'. In this way we can remove babel specific code
> from `LaTeX-arg-usepackage' and add hooks for other packages, if
> needed. For example, I'm developing a file style for polyglossia
> package and I'd like to add a hook for loading possible polyglossia
> languages style files. Can I go?
Yes, but see the comments below.
> +(defvar LaTeX-after-document-hooks nil
> + "List of functions to be run at the end of `TeX-arg-document'.
> +
> +To insert a hook here, you must insert it in the appropiate style file.")
Hook variables are usually called `*-hook' (singular) or `*-functions'.
I think one uses `hook' when it's meant for users to be customized, and
`functions' when it's more some internal implementation detail. IMO,
here it's the latter, so I'd go with `TeX-arg-document-functions' (TeX
instead of LaTeX to match the corresponding function).
> +(defvar LaTeX-after-usepackage-hooks nil
> + "List of functions to be run at the end of `LaTeX-arg-usepackage'.
> +
> +To insert a hook here, you must insert it in the appropiate style file.")
Here I'd use `LaTeX-arg-usepackage-functions'.
Bye,
Tassilo