* David Kastrup (2007-10-07) writes:

> Ralf Angeli <[EMAIL PROTECTED]> writes:
>
>> * Ralf Angeli (2007-10-05) writes:
>>
>>> An easy way out would be to rename the symbol to something less generic,
>>> e.g. `TeX-master-or-region-file'.  A nicer way would be to get rid of
>>> the whole awkward construct of a locally defined function.
>>
>> The attached patch should do that.  It still has the shortcoming of
>> `TeX-master-or-region-file' relying on `file' being defined outside of
>> it and indicating the function to call.  Any better suggestions?
>
> I think this tries to hard to keep the old contorted logic

It's more a move in the other direction.  It does not want to keep the
old contorted logic, but does not try hard enough to get rid of it.

> while still
> breaking backwards-compatibility with previous TeX-command-list
> specifications.

Yeah, that's an issue.

> I think we should just special-case a check for 'file and be done (for
> as long as TeX-command-list keeps its basic structure).  Future AUCTeX
> programmers will thank us for it.  The present logic is too clever
> just for the single purpose of interpreting "file".

I don't think somebody will thank us for keeping that piece of code
alive.  At least I found it very difficult to understand what's going
on.  Anyway, the special casing could look something like this:

--- tex-buf.el  08 Aug 2007 19:41:49 +0200      1.262
+++ tex-buf.el  07 Oct 2007 13:27:57 +0200      
@@ -310,7 +310,8 @@
            expansion (car (cdr entry)) ;Second element
            arguments (cdr (cdr entry)) ;Remaining elements
            string (save-match-data
-                    (cond ((TeX-function-p expansion)
+                    (cond ((and (not (eq expansion 'file))
+                                (TeX-function-p expansion))
                            (apply expansion arguments))
                           ((boundp expansion)
                            (apply (eval expansion) arguments))


-- 
Ralf


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

Reply via email to