Function: vc-finish-logentry

vc-finish-logentry is an interactive and byte-compiled function defined in vc-dispatcher.el.gz.

Signature

(vc-finish-logentry &optional NOCOMMENT)

Documentation

Complete the operation implied by the current log entry.

Use the contents of the current buffer as a check-in or registration comment. If the optional arg NOCOMMENT is non-nil, then don't check the buffer contents as a comment.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-dispatcher.el.gz
;; vc-finish-logentry is typically called from a log-edit buffer (see
;; vc-start-logentry).
(defun vc-finish-logentry (&optional nocomment)
  "Complete the operation implied by the current log entry.
Use the contents of the current buffer as a check-in or registration
comment.  If the optional arg NOCOMMENT is non-nil, then don't check
the buffer contents as a comment."
  (interactive)
  ;; Check and record the comment, if any.
  (unless nocomment
    (run-hooks 'vc-logentry-check-hook))
  ;; Sync parent buffer in case the user modified it while editing the comment.
  ;; But not if it is a vc-dir buffer.
  (with-current-buffer vc-parent-buffer
    (or (vc-dispatcher-browsing) (vc-buffer-sync)))
  (unless vc-log-operation
    (error "No log operation is pending"))

  ;; save the parameters held in buffer-local variables
  (let ((logbuf (current-buffer))
	(log-operation vc-log-operation)
        ;; FIXME: When coming from VC-Dir, we should check that the
        ;; set of selected files is still equal to vc-log-fileset,
        ;; to avoid surprises.
	(log-fileset vc-log-fileset)
	(log-entry (buffer-string))
	(after-hook vc-log-after-operation-hook))
    (pop-to-buffer vc-parent-buffer)
    ;; OK, do it to it
    (save-excursion
      (funcall log-operation
	       log-fileset
	       log-entry))
    (setq vc-log-operation nil)

    ;; Quit windows on logbuf.
    (cond
     ((not logbuf))
     (vc-delete-logbuf-window
      (quit-windows-on logbuf t (selected-frame)))
     (t
      (quit-windows-on logbuf nil 0)))

    ;; Now make sure we see the expanded headers
    (when log-fileset
      (mapc
       (lambda (file) (vc-resynch-buffer file t t))
       log-fileset))
    (run-hooks after-hook 'vc-finish-logentry-hook)))