diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-01 20:37:39 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-01 20:37:39 -0400 |
commit | fe0a74f91ab1a6662bbcbf4a19013f43b4e24d5c (patch) | |
tree | 9c00994bd66fd83ae1028c5589ec61e5b0ff3812 /lisp/vc/add-log.el | |
parent | 090cf9dbb07e7ab0817c208b6d8dcd613180b7c3 (diff) | |
download | emacs-fe0a74f91ab1a6662bbcbf4a19013f43b4e24d5c.tar.gz |
* lisp/vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar
and give a non-nil default value.
(add-change-log-entry): Simplify accordingly.
Diffstat (limited to 'lisp/vc/add-log.el')
-rw-r--r-- | lisp/vc/add-log.el | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index fb6f8d4d58b..5a378df6513 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -136,12 +136,10 @@ this variable." :type 'boolean :group 'change-log) -(defcustom add-log-buffer-file-name-function nil +(defvar add-log-buffer-file-name-function 'buffer-file-name "If non-nil, function to call to identify the full filename of a buffer. -This function is called with no argument. If this is nil, the default is to -use `buffer-file-name'." - :type '(choice (const nil) function) - :group 'change-log) +This function is called with no argument. The default is to +use `buffer-file-name'.") (defcustom add-log-file-name-function nil "If non-nil, function to call to identify the filename for a ChangeLog entry. @@ -806,9 +804,7 @@ non-nil, otherwise in local time." (let* ((defun (add-log-current-defun)) (version (and change-log-version-info-enabled (change-log-version-number-search))) - (buf-file-name (if add-log-buffer-file-name-function - (funcall add-log-buffer-file-name-function) - buffer-file-name)) + (buf-file-name (funcall add-log-buffer-file-name-function)) (buffer-file (if buf-file-name (expand-file-name buf-file-name))) (file-name (expand-file-name (find-change-log file-name buffer-file))) ;; Set ITEM to the file name to use in the new item. |