monnier pushed a commit to branch externals/auctex
in repository elpa.

commit b957e894ce44aa17b2e5047c89bcccad16fdc3d7
Author: Mosè Giordano <giordano.m...@libero.it>
Date:   Tue Apr 16 20:53:45 2013 +0200

    Change default value of `LaTeX-default-author' and adapt `LaTeX-arg-author'.
    
    * latex.el (LaTeX-default-author): Change default to 'user-full-name
    (quoted) and add a new possible value.
    (LaTeX-arg-author): Change accordingly.
---
 ChangeLog |    3 +++
 latex.el  |    9 ++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5cdc377..b09750a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
        (LaTeX-arg-author): New function.
        (LaTeX-common-initialization): Use `LaTeX-arg-author' for the
        \author macro.
+       (LaTeX-default-author): Change default to 'user-full-name (quoted)
+       and add a new possible value.
+       (LaTeX-arg-author): Change accordingly.
 
        * doc/auctex.texi (Itemize-like): Document `TeX-arg-item-label-p'
        option.
diff --git a/latex.el b/latex.el
index d647bba..b42450c 100644
--- a/latex.el
+++ b/latex.el
@@ -2196,11 +2196,12 @@ string."
                   TeX-left-right-braces)))
        (indent-according-to-mode)))))
 
-(defcustom LaTeX-default-author user-full-name
+(defcustom LaTeX-default-author 'user-full-name
   "Initial input to `LaTeX-arg-author' prompt.
 If nil, do not prompt at all."
   :group 'LaTeX-macro
-  :type '(choice (const :tag "Do not prompt" nil)
+  :type '(choice (const :tag "User name in Emacs" user-full-name)
+                (const :tag "Do not prompt" nil)
                 string))
 
 (defun LaTeX-arg-author (optional &optional prompt)
@@ -2211,7 +2212,9 @@ prompt string.  `LaTeX-default-author' is the initial 
input."
   (let ((author (if LaTeX-default-author
                    (read-string
                     (TeX-argument-prompt optional prompt "Author(s)")
-                    LaTeX-default-author)
+                    (if (symbolp LaTeX-default-author)
+                        (symbol-value LaTeX-default-author)
+                      LaTeX-default-author))
                  "")))
     (TeX-argument-insert author optional nil)))
 

Reply via email to