[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Insertion of braces when the last argument of a macro
From: |
David Kastrup |
Subject: |
Re: [AUCTeX-devel] Insertion of braces when the last argument of a macro is optional |
Date: |
Mon, 30 Sep 2013 12:43:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Tassilo Horn <address@hidden> writes:
> Mosè Giordano <address@hidden> writes:
>
> Hi Mosè,
>
>> You're right, I agree. The attached patch takes a completely
>> different approach: it makes it possible to override the value of
>> `TeX-insert-braces'. `TeX-insert-braces' is forced to nil for
>> {top,mid,bottom}rule macros. A FIXME in style/booktabs.el is also
>> resolved.
>
> I don't like the setq-ing and resetting of `TeX-insert-braces'. It's
> not unlikely that a user aborts (C-g) while inserting a macro, and then
> the resetting is skipped. You could ensure resetting by wrapping
> anything else in a `ignore-errors` form, but even then things could go
> wrong in case a user aborts before the original value has been saved.
The right way to do that kind of unconditional restore is using
unwind-protect for it.
But wouldn't using let on TeX-insert-braces achieve just that?
--
David Kastrup