Function: diff-add-change-log-entries-other-window
diff-add-change-log-entries-other-window is an interactive and
byte-compiled function defined in diff-mode.el.gz.
Signature
(diff-add-change-log-entries-other-window)
Documentation
Iterate through the current diff and create ChangeLog entries.
I.e. like add-change-log-entry-other-window but applied to all hunks.
Probably introduced at or before Emacs version 23.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defun diff-add-change-log-entries-other-window ()
"Iterate through the current diff and create ChangeLog entries.
I.e. like `add-change-log-entry-other-window' but applied to all hunks."
(interactive)
;; XXX: Currently add-change-log-entry-other-window is only called
;; once per hunk. Some hunks have multiple changes, it would be
;; good to call it for each change.
(save-excursion
(goto-char (point-min))
(condition-case nil
;; Call add-change-log-entry-other-window for each hunk in
;; the diff buffer.
(while (progn
(diff-hunk-next)
;; Move to where the changes are,
;; `add-change-log-entry-other-window' works better in
;; that case.
(re-search-forward
(concat "\n[!+<>-]"
;; If the hunk is a context hunk with an empty first
;; half, recognize the "--- NNN,MMM ----" line
"\\(-- [0-9]+\\(,[0-9]+\\)? ----\n"
;; and skip to the next non-context line.
"\\( .*\n\\)*[+]\\)?")
nil t))
(save-excursion
;; FIXME: this pops up windows of all the buffers.
(add-change-log-entry nil nil t nil t)))
;; When there's no more hunks, diff-hunk-next signals an error.
(error nil))))