Make %F fall back to email address in message-citation-line-format.
authorAdam Sjøgren <asjo@koldfront.dk>
Wed, 25 Feb 2015 20:49:25 +0000 (21:49 +0100)
committerAdam Sjøgren <asjo@koldfront.dk>
Sat, 7 Mar 2015 21:41:05 +0000 (22:41 +0100)
* message.el (message-insert-formatted-citation-line): Change %F to
fall back to email address if no first name could be determined.

lisp/ChangeLog
lisp/message.el

index 2047481..b0e26d8 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-25  Adam Sjøgren  <asjo@koldfront.dk>
+
+       * message.el (message-insert-formatted-citation-line): Change %F to
+       fall back to email address if no first name could be determined.
+
 2015-02-26  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part):
index 6bafc47..7b9eb76 100644 (file)
@@ -1017,7 +1017,8 @@ are replaced:
   %n   The mail address, e.g. \"john.doe@example.invalid\".
   %N   The real name if present, e.g.: \"John Doe\", else fall
        back to the mail address.
-  %F   The first name if present, e.g.: \"John\".
+  %F   The first name if present, e.g.: \"John\", else fall
+       back to the mail address.
   %L   The last name if present, e.g.: \"Doe\".
   %Z, %z   The time zone in the numeric form, e.g.:\"+0000\".
 
@@ -4036,7 +4037,7 @@ See `message-citation-line-format'."
                              from)
                   (error nil)))
           (name (car data))
-          (fname name)
+          (fname-or-net (or name (car (cdr data)) from))
           (lname name)
           (net (car (cdr data)))
           (name-or-net (or (car data)
@@ -4083,7 +4084,7 @@ See `message-citation-line-format'."
                       (setq fname lname lname newlname)))))
              ;; The following letters are not used in `format-time-string':
              (push ?E lst) (push "<E>" lst)
-             (push ?F lst) (push fname lst)
+             (push ?F lst) (push fname-or-net lst)
              ;; We might want to use "" instead of "<X>" later.
              (push ?J lst) (push "<J>" lst)
              (push ?K lst) (push "<K>" lst)