Function: highlight-changes-mode
highlight-changes-mode is an autoloaded, interactive and byte-compiled
function defined in hilit-chg.el.gz.
Signature
(highlight-changes-mode &optional ARG)
Documentation
Toggle highlighting changes in this buffer (Highlight Changes mode).
This is a minor mode. If called interactively, toggle the
Highlight-Changes mode mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the
mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate highlight-changes-mode(var)/highlight-changes-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
When Highlight Changes is enabled, changes are marked with a text
property. Normally they are displayed in a distinctive face, but
command M-x highlight-changes-visible-mode (highlight-changes-visible-mode) can be used to toggle
this on and off.
Other functions for buffers in this mode include:
M-x highlight-changes-next-change (highlight-changes-next-change) - move point to beginning of next change
M-x highlight-changes-previous-change (highlight-changes-previous-change) - move to beginning of previous change
M-x highlight-changes-remove-highlight (highlight-changes-remove-highlight) - remove the change face from the region
M-x highlight-changes-rotate-faces (highlight-changes-rotate-faces) - rotate different "ages" of changes
through various faces.
M-x highlight-compare-with-file (highlight-compare-with-file) - mark text as changed by comparing this
buffer with the contents of a file
M-x highlight-compare-buffers (highlight-compare-buffers) highlights differences between two buffers.
Probably introduced at or before Emacs version 20.3.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/hilit-chg.el.gz
;;; Functions...
;;;###autoload
(define-minor-mode highlight-changes-mode
"Toggle highlighting changes in this buffer (Highlight Changes mode).
When Highlight Changes is enabled, changes are marked with a text
property. Normally they are displayed in a distinctive face, but
command \\[highlight-changes-visible-mode] can be used to toggle
this on and off.
Other functions for buffers in this mode include:
\\[highlight-changes-next-change] - move point to beginning of next change
\\[highlight-changes-previous-change] - move to beginning of previous change
\\[highlight-changes-remove-highlight] - remove the change face from the region
\\[highlight-changes-rotate-faces] - rotate different \"ages\" of changes
through various faces.
\\[highlight-compare-with-file] - mark text as changed by comparing this
buffer with the contents of a file
\\[highlight-compare-buffers] highlights differences between two buffers."
:lighter hilit-chg-string
(if (or (display-color-p)
(and (fboundp 'x-display-grayscale-p) (x-display-grayscale-p)))
(progn
(if (and (eq this-command 'global-highlight-changes-mode)
(not highlight-changes-global-changes-existing-buffers))
;; The global mode has toggled the value of the mode variable,
;; but not other changes have been mode, so we are safe
;; to retoggle it.
(setq highlight-changes-mode (not highlight-changes-mode)))
(if highlight-changes-mode
;; it is being turned on
(hilit-chg-set)
;; mode is turned off
(hilit-chg-clear)))
(message "Highlight Changes mode requires color or grayscale display")))