Function: log-edit-previous-comment

log-edit-previous-comment is an interactive and byte-compiled function defined in log-edit.el.gz.

Signature

(log-edit-previous-comment ARG)

Documentation

Cycle backwards through VC commit comment history.

With a numeric prefix ARG, go back ARG comments.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/log-edit.el.gz
(defun log-edit-previous-comment (arg)
  "Cycle backwards through VC commit comment history.
With a numeric prefix ARG, go back ARG comments."
  (interactive "*p")
  (let ((len (ring-length log-edit-comment-ring)))
    (if (<= len 0)
	(progn (message "Empty comment ring") (ding))
      ;; Don't use `erase-buffer' because we don't want to `widen'.
      (delete-region (point-min) (point-max))
      (setq log-edit-comment-ring-index (log-edit-new-comment-index arg len))
      (message "Comment %d" (1+ log-edit-comment-ring-index))
      (insert (ring-ref log-edit-comment-ring log-edit-comment-ring-index)))))