471 |
non-nil, otherwise in local time." |
non-nil, otherwise in local time." |
472 |
(interactive (list current-prefix-arg |
(interactive (list current-prefix-arg |
473 |
(prompt-for-change-log-name))) |
(prompt-for-change-log-name))) |
|
(or add-log-full-name |
|
|
(setq add-log-full-name (user-full-name))) |
|
|
(or add-log-mailing-address |
|
|
(setq add-log-mailing-address user-mail-address)) |
|
|
(if whoami |
|
|
(progn |
|
|
(setq add-log-full-name (read-input "Full name: " add-log-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 add-log-mailing-address |
|
|
(read-input "Mailing address: " add-log-mailing-address)))) |
|
|
|
|
474 |
(let* ((defun (add-log-current-defun)) |
(let* ((defun (add-log-current-defun)) |
475 |
(version (and change-log-version-info-enabled |
(version (and change-log-version-info-enabled |
476 |
(change-log-version-number-search))) |
(change-log-version-number-search))) |
481 |
(file-name (expand-file-name (find-change-log file-name buffer-file))) |
(file-name (expand-file-name (find-change-log file-name buffer-file))) |
482 |
;; Set ITEM to the file name to use in the new item. |
;; Set ITEM to the file name to use in the new item. |
483 |
(item (add-log-file-name buffer-file file-name)) |
(item (add-log-file-name buffer-file file-name)) |
484 |
bound) |
bound |
485 |
|
(full-name (or add-log-full-name (user-full-name))) |
486 |
|
(mailing-address (or add-log-mailing-address user-mail-address))) |
487 |
|
|
488 |
|
(if whoami |
489 |
|
(progn |
490 |
|
(setq full-name (read-input "Full name: " full-name)) |
491 |
|
;; Note that some sites have room and phone number fields in |
492 |
|
;; full name which look silly when inserted. Rather than do |
493 |
|
;; anything about that here, let user give prefix argument so that |
494 |
|
;; s/he can edit the full name field in prompter if s/he wants. |
495 |
|
(setq mailing-address |
496 |
|
(read-input "Mailing address: " mailing-address)))) |
497 |
|
|
498 |
(unless (equal file-name buffer-file-name) |
(unless (equal file-name buffer-file-name) |
499 |
(if (or other-window (window-dedicated-p (selected-window))) |
(if (or other-window (window-dedicated-p (selected-window))) |
513 |
;; Advance into first entry if it is usable; else make new one. |
;; Advance into first entry if it is usable; else make new one. |
514 |
(let ((new-entries (mapcar (lambda (addr) |
(let ((new-entries (mapcar (lambda (addr) |
515 |
(concat (funcall add-log-time-format) |
(concat (funcall add-log-time-format) |
516 |
" " add-log-full-name |
" " full-name |
517 |
" <" addr ">")) |
" <" addr ">")) |
518 |
(if (consp add-log-mailing-address) |
(if (consp mailing-address) |
519 |
add-log-mailing-address |
mailing-address |
520 |
(list add-log-mailing-address))))) |
(list mailing-address))))) |
521 |
(if (and (not add-log-always-start-new-record) |
(if (and (not add-log-always-start-new-record) |
522 |
(let ((hit nil)) |
(let ((hit nil)) |
523 |
(dolist (entry new-entries hit) |
(dolist (entry new-entries hit) |