(defvar change-log-default-name nil
"*Name of a change log file for \\[add-change-log-entry].")
+;;;###autoload
+(defvar add-log-current-defun-function nil
+ "\
+*If non-nil, function to guess name of current function from surrounding text.
+\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
+instead) with no arguments. It returns a string or nil if it cannot guess.")
+
(defun change-log-name ()
(or change-log-default-name
(if (eq system-type 'vax-vms) "$CHANGE_LOG$.TXT" "ChangeLog")))
(site-name (if whoami
(read-input "Site name: " (system-name))
(system-name)))
- (defun (add-log-current-defun))
+ (defun (funcall (or add-log-current-defun-function
+ 'add-log-current-defun)))
paragraph-end entry)
(setq file-name (find-change-log file-name))
;;;###autoload
(defun add-change-log-entry-other-window (&optional whoami file-name)
"Find change log file in other window and add an entry for today.
-First arg (interactive prefix) non-nil means prompt for user name and site.
-Second arg is file name of change log.
-Interactively, with a prefix argument, the file name is prompted for."
+Optional arg (interactive prefix) non-nil means prompt for user name and site.
+Second arg is file name of change log. \
+If nil, uses `change-log-default-name'."
(interactive (if current-prefix-arg
(list current-prefix-arg
(prompt-for-change-log-name))))