Mosè Giordano <[email protected]> writes:
> 2013/4/16 Tassilo Horn <[email protected]>:
>>> +(defun LaTeX-arg-author (optional)
>>> + "Prompt for author name.
>>> +Insert the given value as a TeX macro argument. If OPTIONAL is
>>> +non-nil, insert it as an optional argument. Use
>>> +`LaTeX-default-author' as initial input."
>>> + (let ((author (if LaTeX-default-author
>>> + (read-string "Author(s): " (eval LaTeX-default-author))
>>
>> Why the `eval'? Just LaTeX-default-author will also do.
> Because there is the possible value
> (const :tag "User name in Emacs" user-full-name)
Ah, I see.
> If one sets `LaTeX-default-author' using customize interface (few
> people use customize, but... who knows?)
No, I think many use it.
> and chooses the previous option, its value will be 'user-full-name
> (quoted). But the simplest solution is to remove that value, one can
> easily restore default value erasing customization.
No no, let's keep it, and let's also use 'user-full-name (quoted) as
default value. Then, I think using
(if (symbolp LaTeX-default-author)
(symbol-value LaTeX-default-author)
LaTeX-default-author)
is preferrable to `eval'.
Bye,
Tassilo
_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel