Function: vc-log-edit

vc-log-edit is a byte-compiled function defined in vc-dispatcher.el.gz.

Signature

(vc-log-edit FILESET MODE BACKEND)

Documentation

Set up log-edit for use on FILE.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-dispatcher.el.gz
(defun vc-log-edit (fileset mode backend)
  "Set up `log-edit' for use on FILE."
  (setq default-directory
	(buffer-local-value 'default-directory vc-parent-buffer))
  (require 'log-edit)
  (log-edit 'vc-finish-logentry
	    ;; Setup a new log message if the log buffer is "empty",
	    ;; or was previously used for a different set of files.
	    (or (log-edit-empty-buffer-p)
		(and (local-variable-p 'vc-log-fileset)
		     (not (equal vc-log-fileset fileset))))
	    `((log-edit-listfun
               . (lambda ()
                   ;; FIXME: When fileset includes directories, and
                   ;; there are relevant ChangeLog files inside their
                   ;; children, we don't find them.  Either handle it
                   ;; in `log-edit-insert-changelog-entries' by
                   ;; walking down the file trees, or somehow pass
                   ;; `fileset-only-files' from `vc-next-action'
                   ;; through to this function.
                   (let ((root (vc-root-dir)))
                     ;; Returns paths relative to the root, so that
                     ;; `log-edit-changelog-insert-entries'
                     ;; substitutes them in correctly later, even when
                     ;; `vc-checkin' was called from a file buffer, or
                     ;; a non-root VC-Dir buffer.
                     (mapcar
                      (lambda (file) (file-relative-name file root))
                      ',fileset))))
	      (log-edit-diff-function . vc-diff)
	      (log-edit-vc-backend . ,backend)
	      (vc-log-fileset . ,fileset))
	    nil
	    mode)
  (set-buffer-modified-p nil)
  (setq buffer-file-name nil))