auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] A real-life problem...


From: David Kastrup
Subject: Re: [AUCTeX-devel] A real-life problem...
Date: Tue, 07 Jun 2005 12:26:00 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> * David Kastrup (2005-06-07) writes:
>
>> --- tex.el   05 Jun 2005 19:07:23 +0200      5.524
>> +++ tex.el   07 Jun 2005 04:51:13 +0200      
>> @@ -2669,28 +2669,72 @@
>>    :group 'TeX-parse)
>>    (make-variable-buffer-local 'TeX-auto-x-regexp-list)
>>  
>> +(defun TeX-regexp-group-count (regexp)
>> +  "Return number of groups in a regexp.  This assumes the following
>> +heuristic:  Any occurrence of the pattern `\\\\([^?]' is an opening group,
>> +so if you want to have something like `\\\\\\\\(', write it as 
>> `\\\\\\\\[(]'."
>
> Hm, probably nobody will think about that when writing a regexp.
> Couldn't the function recognize such constructs itself and disregard
> them?

Well, I thought about doing this "right" in every case.  And then I
thought about "[\\(]" and decided that I had no real chance.

Maybe something that will work in more cases is reasonably easy to do
and not too inefficient.  I am not sure it will be worth the trouble,
but if somebody else is of a different opinion, I don't mind if he
comes up with something.

> Isn't #'(lambda ...) a pleonasm?  As far as I understand (info
> "(elisp)Anonymous Functions") a bare (lambda ...) should suffice
> because `lambda' already implies `function' and #' is a shorthand
> for `function'.

Ok.  The doc string for "lambda" only mentions it as self-quoting, but
not the "will be compiled" consequence, which is the difference
between `function' and `quote'.  But you are right here.

>> The question is whether I am going actually overboard here with
>> trying to keep the order of the lists more or less in-sequence like
>> it was previously the case.
>>
>> Does anybody have enough of a clue to tell whether the order is
>> important here?  If not, one can leave off the sequencing stuff
>> using `count', maybe making this more efficient.
>
> I am not too much into this code right now but if I had to guess I'd
> say it is not important.

Well, if I don't do it, the existing order will also get juggled.
This is concerning index entries, and it might be that this affects
RefTeX.  Carsten?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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