aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-10-01 20:37:39 -0400
committerStefan Monnier2012-10-01 20:37:39 -0400
commitfe0a74f91ab1a6662bbcbf4a19013f43b4e24d5c (patch)
tree9c00994bd66fd83ae1028c5589ec61e5b0ff3812
parent090cf9dbb07e7ab0817c208b6d8dcd613180b7c3 (diff)
downloademacs-fe0a74f91ab1a6662bbcbf4a19013f43b4e24d5c.tar.gz
emacs-fe0a74f91ab1a6662bbcbf4a19013f43b4e24d5c.zip
* 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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc/add-log.el12
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bb5e79e4ac2..8d541da24ae 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar
4 and give a non-nil default value.
5 (add-change-log-entry): Simplify accordingly.
6
12012-10-01 Dmitry Gutov <dgutov@yandex.ru> 72012-10-01 Dmitry Gutov <dgutov@yandex.ru>
2 8
3 * vc/vc-git.el (vc-git-log-edit-toggle-signoff): New function. 9 * vc/vc-git.el (vc-git-log-edit-toggle-signoff): New function.
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."
136 :type 'boolean 136 :type 'boolean
137 :group 'change-log) 137 :group 'change-log)
138 138
139(defcustom add-log-buffer-file-name-function nil 139(defvar add-log-buffer-file-name-function 'buffer-file-name
140 "If non-nil, function to call to identify the full filename of a buffer. 140 "If non-nil, function to call to identify the full filename of a buffer.
141This function is called with no argument. If this is nil, the default is to 141This function is called with no argument. The default is to
142use `buffer-file-name'." 142use `buffer-file-name'.")
143 :type '(choice (const nil) function)
144 :group 'change-log)
145 143
146(defcustom add-log-file-name-function nil 144(defcustom add-log-file-name-function nil
147 "If non-nil, function to call to identify the filename for a ChangeLog entry. 145 "If non-nil, function to call to identify the filename for a ChangeLog entry.
@@ -806,9 +804,7 @@ non-nil, otherwise in local time."
806 (let* ((defun (add-log-current-defun)) 804 (let* ((defun (add-log-current-defun))
807 (version (and change-log-version-info-enabled 805 (version (and change-log-version-info-enabled
808 (change-log-version-number-search))) 806 (change-log-version-number-search)))
809 (buf-file-name (if add-log-buffer-file-name-function 807 (buf-file-name (funcall add-log-buffer-file-name-function))
810 (funcall add-log-buffer-file-name-function)
811 buffer-file-name))
812 (buffer-file (if buf-file-name (expand-file-name buf-file-name))) 808 (buffer-file (if buf-file-name (expand-file-name buf-file-name)))
813 (file-name (expand-file-name (find-change-log file-name buffer-file))) 809 (file-name (expand-file-name (find-change-log file-name buffer-file)))
814 ;; Set ITEM to the file name to use in the new item. 810 ;; Set ITEM to the file name to use in the new item.