- (or full-name
- (setq full-name (or add-log-full-name (user-full-name))))
- (or mailing-address
- (setq mailing-address (or add-log-mailing-address user-mail-address)))
-
- ;; If file starts with a copyright and permission notice, skip them.
- ;; Assume they end at first blank line.
- (when (looking-at "Copyright")
- (search-forward "\n\n")
- (skip-chars-forward "\n"))
-
- ;; Advance into first entry if it is usable; else make new one.
- (let ((new-entries
- (mapcar (lambda (addr)
- (concat
- (if (stringp add-log-time-zone-rule)
- (let ((tz (getenv "TZ")))
- (unwind-protect
- (progn
- (set-time-zone-rule add-log-time-zone-rule)
- (funcall add-log-time-format))
- (set-time-zone-rule tz)))
- (funcall add-log-time-format))
- " " full-name
- " <" addr ">"))
- (if (consp mailing-address)
- mailing-address
- (list mailing-address)))))
- (if (and (not add-log-always-start-new-record)
- (let ((hit nil))
- (dolist (entry new-entries hit)
- (when (looking-at (regexp-quote entry))
- (setq hit t)))))
- (forward-line 1)
- (insert (nth (random (length new-entries))
- new-entries)
- (if use-hard-newlines hard-newline "\n")
- (if use-hard-newlines hard-newline "\n"))
- (forward-line -1)))
+ (let ((full-name (or add-log-full-name (user-full-name)))
+ (mailing-address (or add-log-mailing-address user-mail-address)))
+
+ (when whoami
+ (setq full-name (read-string "Full name: " full-name))
+ ;; Note that some sites have room and phone number fields in
+ ;; full name which look silly when inserted. Rather than do
+ ;; anything about that here, let user give prefix argument so that
+ ;; s/he can edit the full name field in prompter if s/he wants.
+ (setq mailing-address
+ (read-string "Mailing address: " mailing-address)))
+
+ ;; If file starts with a copyright and permission notice, skip them.
+ ;; Assume they end at first blank line.
+ (when (looking-at "Copyright")
+ (search-forward "\n\n")
+ (skip-chars-forward "\n"))
+
+ ;; Advance into first entry if it is usable; else make new one.
+ (let ((new-entries
+ (mapcar (lambda (addr)
+ (concat
+ (if (stringp add-log-time-zone-rule)
+ (let ((tz (getenv "TZ")))
+ (unwind-protect
+ (progn
+ (set-time-zone-rule add-log-time-zone-rule)
+ (funcall add-log-time-format))
+ (set-time-zone-rule tz)))
+ (funcall add-log-time-format))
+ " " full-name
+ " <" addr ">"))
+ (if (consp mailing-address)
+ mailing-address
+ (list mailing-address)))))
+ (if (and (not add-log-always-start-new-record)
+ (let ((hit nil))
+ (dolist (entry new-entries hit)
+ (when (looking-at (regexp-quote entry))
+ (setq hit t)))))
+ (forward-line 1)
+ (insert (nth (random (length new-entries))
+ new-entries)
+ (if use-hard-newlines hard-newline "\n")
+ (if use-hard-newlines hard-newline "\n"))
+ (forward-line -1))))