Function: diff-hunk-prev
diff-hunk-prev is an interactive and byte-compiled function defined in
diff-mode.el.gz.
Signature
(diff-hunk-prev &optional COUNT)
Documentation
Go to the previous COUNT'th hunk.
Interactively, COUNT is the prefix numeric argument, and defaults to 1.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
;; Define diff-{hunk,file}-{prev,next}
(easy-mmode-define-navigation
diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view
(when (and (eq diff-refine 'navigation) (called-interactively-p 'interactive))
(unless (prog1 diff--auto-refine-data
(setq diff--auto-refine-data
(cons (current-buffer) (point-marker))))
(run-at-time 0.0 nil
(lambda ()
(when diff--auto-refine-data
(let ((buffer (car diff--auto-refine-data))
(point (cdr diff--auto-refine-data)))
(setq diff--auto-refine-data nil)
(with-local-quit
(when (buffer-live-p buffer)
(with-current-buffer buffer
(save-excursion
(goto-char point)
(diff-refine-hunk 'skip-if-large))))))))))))