auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el
Date: Wed, 13 Feb 2013 13:02:56 +0100

Hi Tassilo,

2013/2/12 Tassilo Horn <address@hidden>:
> That doesn't sound like the right solution.  Too much fuzz for such an
> uncommon use-case, IMHO.
>
> Maybe the style hooks should be run inside a `condition-case', and in
> case of an error we simply run `TeX-normal-mode'?
Yes, I know it's not a common case, indeed I didn't notice this in my
first tests.  But when it comes it can be annoying for a user that
don't know what's happened since buffer is not even switched to the
LaTeX source.

The idea of using `TeX-auto-store-pre-string' came to me when thinking
about a way to store in parsed file the options given to packages at
load time.  Do you have alternative suggestions for this?

If they are OK, can my changes without `TeX-auto-store-pre-string' be
committed?  I'm sending the last patch for `siunitx.el' without those
lines.

2013-02-10  Mosè Giordano  <address@hidden>

        * style/siunitx.el ("siunitx-unit"): New type for the parser.
        (LaTeX-siunitx-regexp): New variable.
        (LaTeX-auto-siunitx-unit): New variable.
        (LaTeX-siunitx-prepare): New function.
        (LaTeX-siunitx-cleanup): New function.
        (TeX-auto-prepare-hook): Add `LaTeX-siunitx-prepare' function.
        (TeX-auto-cleanup-hook): Add `LaTeX-siunitx-cleanup' function.
        (TeX-arg-siunitx-unit): New function.
        (TeX-arg-define-siunitx-unit): New function.
        ("siunitx"): Add `LaTeX-siunitx-regexp' to list of regexps used for
        parsing.
        ("siunitx"): Use `TeX-arg-siunitx-unit' and
        `TeX-arg-define-siunitx-unit' functions.
        ("siunitx"): Use `LaTeX-add-siunitx-units' for adding siunitx unit
        macros to the list of known units.


Bye,
Mosè Giordano

Attachment: siunitx.el.patch
Description: Binary data


reply via email to

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