[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] Difficulties understanding the behavior of TeX-parse-argu
[AUCTeX-devel] Difficulties understanding the behavior of TeX-parse-argument
Tue, 5 Nov 2013 00:55:33 +0100
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?
I spotted this problem trying to fix a bug in `style/biblatex.el'. I
defined completion for some macros with `TeX-arg-key-val <list>',
being `<list>' a lisp expression instead of a new variable. After
some tests I noticed that replacing quotation with apostrophe with a
`quote' function fixed the problem and I pushed the commit 830437f to
the repository. I can swear that that change yesterday fixed the
problem, before pushing the commit I byte-compiled the style file and
restarted Emacs to verify it worked, but today I found that it was
completely useless. This looks like a Heisenbug to me!
I know that the problem in `style/biblatex.el' can be fixed defining
new variables to be given as argument to the `TeX-arg-key-val's, but
I'd like to understand if I can avoid those variables.
- [AUCTeX-devel] Difficulties understanding the behavior of TeX-parse-argument,
Mosè Giordano <=