Function: diff-prev-line-if-patch-separator
diff-prev-line-if-patch-separator is a byte-compiled function defined
in diff-mode.el.gz.
Signature
(diff-prev-line-if-patch-separator)
Documentation
Return previous line if it has patch separator as produced by git.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defun diff-prev-line-if-patch-separator ()
"Return previous line if it has patch separator as produced by git."
(pcase diff-buffer-type
('git
(save-excursion
(let ((old-point (point)))
(forward-line -1)
(if (looking-at "^-- $")
(point)
old-point))))
(_ (point))))