Function: diff-bounds-of-file
diff-bounds-of-file is a byte-compiled function defined in
diff-mode.el.gz.
Signature
(diff-bounds-of-file)
Documentation
Return the bounds of the file segment at point.
The return value is a list (BEG END), which are the segment's start and end positions.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defun diff-bounds-of-file ()
"Return the bounds of the file segment at point.
The return value is a list (BEG END), which are the segment's
start and end positions."
(save-excursion
(let ((pos (point))
(beg (progn (diff-beginning-of-file-and-junk)
(point))))
(diff-end-of-file)
;; bzr puts a newline after the last hunk.
(while (looking-at "^\n")
(forward-char 1))
(if (> pos (point))
(error "Not inside a file diff"))
(list beg (point)))))