Variable: diff-update-on-the-fly

diff-update-on-the-fly is a customizable variable defined in diff-mode.el.gz.

Value

t

Documentation

Non-nil means hunk headers are kept up-to-date on-the-fly.

When editing a diff file, the line numbers in the hunk headers need to be kept consistent with the actual diff. This can either be done on the fly (but this sometimes interacts poorly with the undo mechanism) or whenever the file is written (can be slow when editing big diffs).

If this variable is nil, the hunk header numbers are updated when the file is written instead.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defcustom diff-update-on-the-fly t
  "Non-nil means hunk headers are kept up-to-date on-the-fly.
When editing a diff file, the line numbers in the hunk headers
need to be kept consistent with the actual diff.  This can
either be done on the fly (but this sometimes interacts poorly with the
undo mechanism) or whenever the file is written (can be slow
when editing big diffs).

If this variable is nil, the hunk header numbers are updated when
the file is written instead."
  :type 'boolean)