aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Fox1993-09-19 01:54:48 +0000
committerBrian Fox1993-09-19 01:54:48 +0000
commit02ec15923b51880aa4a4e8ac685d29cb16393725 (patch)
treee5fbb74daa8d909213cfbb88c2430bce929002bb
parent863f1210026f400727191c3b244ce9f79ab1a901 (diff)
downloademacs-02ec15923b51880aa4a4e8ac685d29cb16393725.tar.gz
emacs-02ec15923b51880aa4a4e8ac685d29cb16393725.zip
add-log-full-name, add-log-mailing-address: new varialbes
-rw-r--r--lisp/add-log.el39
1 files changed, 23 insertions, 16 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 1df14583863..8f06aacd163 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -37,6 +37,17 @@
37\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun' 37\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
38instead) with no arguments. It returns a string or nil if it cannot guess.") 38instead) with no arguments. It returns a string or nil if it cannot guess.")
39 39
40;;;###autoload
41(defvar add-log-full-name (user-full-name)
42 "*Full name of user, for inclusion in ChangeLog daily headers.
43This defaults to the value returned by the `user-full-name' function.")
44
45;;;###autoload
46(defvar add-log-mailing-address (concat (user-login-name) "@" (system-name))
47 "*Electronic mail address of user, for inclusion in ChangeLog daily headers.
48This defaults to the value returned by `user-login-name', followed by
49an `@' character, followed by the value returned by `system-name'.")
50
40(defun change-log-name () 51(defun change-log-name ()
41 (or change-log-default-name 52 (or change-log-default-name
42 (if (eq system-type 'vax-vms) "$CHANGE_LOG$.TXT" "ChangeLog"))) 53 (if (eq system-type 'vax-vms) "$CHANGE_LOG$.TXT" "ChangeLog")))
@@ -110,22 +121,18 @@ Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
110never append to an existing entry." 121never append to an existing entry."
111 (interactive (list current-prefix-arg 122 (interactive (list current-prefix-arg
112 (prompt-for-change-log-name))) 123 (prompt-for-change-log-name)))
113 (let* ((full-name (if whoami 124 (if whoami
114 (read-input "Full name: " (user-full-name)) 125 (progn
115 (user-full-name))) 126 (setq add-log-full-name (read-input "Full name: " add-log-full-name))
116 ;; Note that some sites have room and phone number fields in 127 ;; Note that some sites have room and phone number fields in
117 ;; full name which look silly when inserted. Rather than do 128 ;; full name which look silly when inserted. Rather than do
118 ;; anything about that here, let user give prefix argument so that 129 ;; anything about that here, let user give prefix argument so that
119 ;; s/he can edit the full name field in prompter if s/he wants. 130 ;; s/he can edit the full name field in prompter if s/he wants.
120 (login-name (if whoami 131 (setq add-log-mailing-address
121 (read-input "Login name: " (user-login-name)) 132 (read-input "Mailing address: " add-log-mailing-address))))
122 (user-login-name))) 133 (let ((defun (funcall (or add-log-current-defun-function
123 (site-name (if whoami 134 'add-log-current-defun)))
124 (read-input "Site name: " (system-name)) 135 paragraph-end entry)
125 (system-name)))
126 (defun (funcall (or add-log-current-defun-function
127 'add-log-current-defun)))
128 paragraph-end entry)
129 136
130 (setq file-name (find-change-log file-name)) 137 (setq file-name (find-change-log file-name))
131 138
@@ -147,12 +154,12 @@ never append to an existing entry."
147 (goto-char (point-min)) 154 (goto-char (point-min))
148 (if (looking-at (concat (regexp-quote (substring (current-time-string) 155 (if (looking-at (concat (regexp-quote (substring (current-time-string)
149 0 10)) 156 0 10))
150 ".* " (regexp-quote full-name) 157 ".* " (regexp-quote add-log-full-name)
151 " (" (regexp-quote login-name) "@")) 158 " (" (regexp-quote add-log-mailing-address)))
152 (forward-line 1) 159 (forward-line 1)
153 (insert (current-time-string) 160 (insert (current-time-string)
154 " " full-name 161 " " add-log-full-name
155 " (" login-name "@" site-name ")\n\n")) 162 " (" add-log-mailing-address ")\n\n"))
156 163
157 ;; Search only within the first paragraph. 164 ;; Search only within the first paragraph.
158 (if (looking-at "\n*[^\n* \t]") 165 (if (looking-at "\n*[^\n* \t]")