Dear Bug Team!
I'm writing a "style" file for AucTeX, but cannot make it works as
advertised in
the AucTeX info ("Adding Macros" node):
,----
| - Function: TeX-add-symbols SYMBOL ...
| Add each SYMBOL to the list of known symbols.
|
| Each argument to `TeX-add-symbols' is a list describing one symbol.
| The head of the list is the name of the symbol, the remaining elements
| describe each argument.
| ...
| `list'
| If the car is a string, insert it as a prompt and the next element
| as initial input. Otherwise, call the car of the list with the
| remaining elements as arguments.
`----
Here is a minimal code that triggers error:
---[style file: testpkg.el]-------------------------------------------
(TeX-add-style-hook "testpkg"
(function
(lambda ()
(TeX-add-symbols
'("testmacro1" '(my-test-function "something"))
'("testmacro2" (list my-test-function "something else"))
))))
(defun my-test-function (arg)
)
----------------------------------------------------------------------
---[backtrace]--------------------------------------------------------
Signaling: (invalid-function #<special-form quote>)
quote(nil (my-test-function "something"))
apply(quote nil (my-test-function "something"))
TeX-parse-argument(nil (quote (my-test-function "something")))
TeX-parse-arguments(((quote (my-test-function "something"))))
TeX-parse-macro("testmacro1" ((quote (my-test-function
"something"))))
#<compiled-function (symbol) "...(24)" [TeX-default-macro symbol
"" TeX-parse-macro assoc TeX-symbol-list] 5
("/opt/lib/xemacs/site-lisp/auctex/tex.elc" . 26889) (list (completing-read ...
...))>("testmacro1")
call-interactively(TeX-insert-macro)
----------------------------------------------------------------------
Apparently, argument passing to `TeX-parse-*' functions is the quoted form, not
the list itself as these functions expect. Thus, the following snipset code in
`TeX-parse-argument' doesn't work as intended
,----
| (let ((head (car arg))
| (tail (cdr arg)))
| (cond ((stringp head)
| (apply 'TeX-arg-string optional arg))
| ((symbolp head)
| (apply head optional tail))
| (t (error "Unknown list argument type %s"
| (prin1-to-string head))))))
`----
Is it a bug in AucTeX or did I miss something?
================================================================
System Info to help track down your bug:
---------------------------------------
AucTeX-11.10.
uname -a: Linux
venus.bom.org 2.4.17 #11 Thu Dec 27 02:03:44 EST 2001 i686 unknown
./configure 'i686-pc-linux' '--prefix=/usr/local' '--with-mule'
'--with-xim=xlib' '--with-dialogs=no' '--with-menubars=lucid'
'--with-scrollbars=lucid' '--with-widgets=athena'
'--with-athena=3d' '--error-checking=none' '--cflags=-O3
-mcpu=pentiumpro -march=pentiumpro'
XEmacs 21.4.6 "Common Lisp" configured for `i686-pc-linux'.
Regards,
--
Triet H. Lai