Variable: compare-windows-sync

compare-windows-sync is a customizable variable defined in compare-w.el.gz.

Value

compare-windows-sync-default-function

Documentation

Function or regexp that is used to synchronize points in two windows if before calling compare-windows points are located on mismatched positions.

The value of compare-windows-sync can be a function. The function's job is to advance points in both windows to the next matching text. If the value of compare-windows-sync is a regexp, then points in both windows are advanced to the next occurrence of this regexp.

The current default value is the general function compare-windows-sync-default-function that is able to synchronize points by using quadratic algorithm to find the first matching 32-character string in two windows.

The other useful values of this variable could be such functions as forward-word, forward-sentence, forward-paragraph, or a regexp containing some field separator or a newline, depending on the nature of the difference units separator. The variable can be made buffer-local.

If the value of this variable is nil (option "No sync"), then no synchronization is performed, and the function ding is called to beep or flash the screen when points are mismatched.

This variable was added, or its default value changed, in Emacs 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/compare-w.el.gz
(defcustom compare-windows-sync 'compare-windows-sync-default-function
  "Function or regexp that is used to synchronize points in two
windows if before calling `compare-windows' points are located
on mismatched positions.

The value of `compare-windows-sync' can be a function.  The
function's job is to advance points in both windows to the next
matching text.  If the value of `compare-windows-sync' is a
regexp, then points in both windows are advanced to the next
occurrence of this regexp.

The current default value is the general function
`compare-windows-sync-default-function' that is able to
synchronize points by using quadratic algorithm to find the first
matching 32-character string in two windows.

The other useful values of this variable could be such functions
as `forward-word', `forward-sentence', `forward-paragraph', or a
regexp containing some field separator or a newline, depending on
the nature of the difference units separator.  The variable can
be made buffer-local.

If the value of this variable is nil (option \"No sync\"), then
no synchronization is performed, and the function `ding' is called
to beep or flash the screen when points are mismatched."
  :type '(choice function regexp (const :tag "No sync" nil))
  :version "22.1")