auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Difficulties understanding the behavior of TeX-parse-


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] Difficulties understanding the behavior of TeX-parse-argument
Date: Tue, 5 Nov 2013 17:33:46 +0100

Hi Tassilo,

2013/11/5 Tassilo Horn <address@hidden>:
> Mosè Giordano <address@hidden> writes:
>
> Hi Mosè,
>
>> I'm having a hard time understanding why this code
>>
>>     (let ((foo '(("foo") ("bar"))))
>>       (TeX-parse-argument t '(TeX-read-key-val foo)))
>>
>> works but this
>>
>>     (TeX-parse-argument t '(TeX-read-key-val '(("foo") ("bar"))))
>>
>> doesn't, resulting in a wrong-type-argument error.  In the outer
>> `cond` of `TeX-parse-argument', both codes enter the `(listp arg)'
>> branch and in the next `cond' they enter then the `(symbolp head)'
>> branch, but the two codes run differently if the CDR of `arg' is a
>> symbol or a lisp expression.  Why?
>
> In the first call, arg is (TeX-read-key-val foo), which is interpreted
> as a funcall of the CAR to the symbol value of the CDR.
>
> In the second call, arg is (TeX-read-key-val (quote (("foo") ("bar")))).
> Note that the list is quoted!  To make both calls equivalent, don't
> double-quote:
>
>   (TeX-parse-argument t '(TeX-read-key-val (("foo") ("bar"))))
>

Thank you, this was driving me crazy!

> It seems your coffee reservoirs are nearly empty. ;-)
>

Probably you're right :-)

Bye,
Mosè



reply via email to

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