emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110332: * lisp/vc/add-log.el (add-lo


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110332: * lisp/vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar
Date: Mon, 01 Oct 2012 20:37:39 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110332
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2012-10-01 20:37:39 -0400
message:
  * 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.
modified:
  lisp/ChangeLog
  lisp/vc/add-log.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-02 00:24:18 +0000
+++ b/lisp/ChangeLog    2012-10-02 00:37:39 +0000
@@ -1,3 +1,9 @@
+2012-10-02  Stefan Monnier  <address@hidden>
+
+       * 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.
+
 2012-10-01  Dmitry Gutov  <address@hidden>
 
        * vc/vc-git.el (vc-git-log-edit-toggle-signoff): New function.

=== modified file 'lisp/vc/add-log.el'
--- a/lisp/vc/add-log.el        2012-08-15 16:29:11 +0000
+++ b/lisp/vc/add-log.el        2012-10-02 00:37:39 +0000
@@ -136,12 +136,10 @@
   :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 @@
   (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]