Oleh <[email protected]> writes: Hi again,
> That one doesn't work either, since I'm calling it on a string, which > is a vector and not a list. Ah, yes, I've overlooked that. > I just side-stepped the issue by calling `how-may' instead. Won't work either. On XEmacs, `how-many' only has one argument REGEXP, so you can't restrict it to a region. :-( So it seems you have to use `re-search-forward' with BOUND parameter in a loop and count the number of matches yourself. By the way: "&" as a regexp is too lax. It also matches tho ampersand in "bla \& bla" which is not a column separator. The regexp "[^\\]&" should do the trick. > Here's an updated patch. Using the :set property of defcustom is a good idea, and it also saves the tabular-like environments variable. One nitpick: +(defvar LaTeX-tabularlike--end nil + "A regular expression that matches the ending of environments +that will be aligned with `LaTeX-indent-tabular'. + +Do not set this variable. This variable is auto-set +by customizing `LaTeX-indent-environment-list'.") The first sentence of a docstring should fit into one line. I'd go with "A regexp matching tabular-like environment ends. Those will be aligned with `LaTeX-indent-tabular'. ..." Also, I'd put a hyphen between "tabular" and "like" in the variable name. And why the double-hyphen? To show that it's kind of private and not intended to be modifier by users? In that case, I think the convention is to use the double-hyphen immediately after the "namespace", that is, `LaTeX--tabular-like-end'. We don't follow that convention in AUCTeX currently (because AUCTeX is much older than that convention), but I wouldn't object to start using it. > It uses `cl-reduce', which is probably not what you want. You name it. ;-) > What's the compatible replacement for `cl-reduce'? A while loop pushing into a local variable, or `mapc' where the lambda pushes into a local variable. Bye, Tassilo _______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
