auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Use user-full-name as initial input to author macro


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] Use user-full-name as initial input to author macro
Date: Tue, 16 Apr 2013 20:34:33 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Mosè Giordano <address@hidden> writes:

> 2013/4/16 Tassilo Horn <address@hidden>:
>>> +(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




reply via email to

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