David Kastrup <[email protected]> writes:

>> 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.

Ah, indeed.

> But wouldn't using let on TeX-insert-braces achieve just that?

Yes, if we had an alist of macros that must always/never have braces
appended, then we could let-bind TeX-insert-braces in `TeX-parse-macro'
taking that alist and `TeX-insert-braces's default value into account
and be done.

Bye,
Tassilo

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to