]> code.delx.au - gnu-emacs/blobdiff - lisp/hilit-chg.el
*** empty log message ***
[gnu-emacs] / lisp / hilit-chg.el
index eae732b8d3f227605d3c62f2422487494f8bf3c3..c7a0586aa44362f145ec30ff91f36c1e362e09b7 100644 (file)
@@ -2,9 +2,11 @@
 
 ;; Copyright (C) 1998 Free Software Foundation, Inc.
 
-;; Author: Richard Sharman <rsharman@magma.ca>
+;; Author: Richard Sharman <rsharman@pobox.com>
 ;; Keywords: faces
 
+;; This file is part of GNU Emacs.
+
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
@@ -44,7 +46,7 @@
 ;; You can "age" different sets of changes by using
 ;; `highlight-changes-rotate-faces'.  This rotates different through a series
 ;; of different faces, so you can distinguish "new" changes from "older"
-;; changes.  You can customize these "rotates" faces in two ways.  You can
+;; changes.  You can customize these "rotated" faces in two ways.  You can
 ;; either explicitly define each face by customizing
 ;; `highlight-changes-face-list'.  If, however, the faces differ from
 ;; `highlight-changes-face' only in the foreground colour, you can simply set
@@ -58,9 +60,9 @@
 ;; `highlight-changes-previous-change'.
 ;;
 ;;
-;; You can also use the command compare-with-file to show changes in this
-;; file compared with another file (typically the previous version of the
-;; file).
+;; You can also use the command highlight-compare-with-file to show changes
+;; in this file compared with another file (typically the previous version
+;; of the file).
 ;;
 ;;
 ;; There are currently three hooks run by `highlight-changes-mode':
 ;; highlight-changes-mode
 ;; highlight-changes-remove-highlight
 ;; highlight-changes-rotate-faces
-;; compare-with-file
+;; highlight-compare-with-file
 
 ;; 
 ;; You can automatically rotate faces when the buffer is saved;
 ;; - having different faces for deletion and non-deletion: is it
 ;;   really worth the hassle?
 ;; - should have better hooks:  when should they be run?
-;; - compare-with-file should allow RCS files - e.g. nice to be able
-;;   to say show changes compared with version 2.1.     
+;; - highlight-compare-with-file should allow RCS files - e.g. nice to be
+;;   able to say show changes compared with version 2.1.
 ;; - Maybe we should have compare-with-buffer as well.  (When I tried
 ;;   a while back I ran into a problem with ediff-buffers-internal.)
 
 
 ;; R Sharman (rsharman@magma.ca) Feb 1998:
 ;; - initial release as change-mode.
-;; Ray Nickson (nickson@mcs.vuw.ac.nz) 20 Feb 1998: 
-;; - deleting text causes surrounding characters to be highlighted.
-;; - make it only active for the current buffer.
 ;; Jari Aalto <jari.aalto@ntc.nokia.com> Mar 1998
 ;; - fixes for byte compile errors 
 ;; - use eval-and-compile for autoload
 ;; Marijn Ros <J.M.Ros@fys.ruu.nl> Mar 98
 ;; - suggested turning it on by default
-;; Adrian Bridgett <adrian.bridgett@zetnet.co.uk> June 98:
-;; - make hide/unhide not affect the buffer modified status
 ;; Eric Ludlam <zappo@gnu.org> Suggested using overlays.
 ;; July 98
 ;; - global mode and various stuff added
 ;; ====================== Customization =======================
 (defgroup highlight-changes nil
   "Highlight Changes mode."
+  :version "20.4"
   :group 'faces)
 
 
@@ -401,6 +399,8 @@ Otherwise, this list will be constructed when needed from
 
 ;; These shouldn't be changed!
 
+;; Autoload for the benefit of `make-mode-line-mouse-sensitive'.
+;;;###autoload
 (defvar highlight-changes-mode nil)
 (defvar hilit-chg-list nil)
 (defvar hilit-chg-string " ??")
@@ -414,7 +414,7 @@ Otherwise, this list will be constructed when needed from
 
 
 (eval-and-compile
-  ;;  For compare-with-file
+  ;;  For highlight-compare-with-file
   (defvar ediff-number-of-differences)
   (autoload 'ediff-setup               "ediff")
   (autoload 'ediff-with-current-buffer "ediff")
@@ -556,7 +556,7 @@ This allows you to manually remove highlighting from uninteresting changes."
   ;;
   ;; This function is called by the `after-change-functions' hook, which
   ;; is how we are notified when text is changed.
-  ;; It is also called from `compare-with-file'.
+  ;; It is also called from `highlight-compare-with-file'.
   ;;
   ;; We do NOT want to simply do this if this is an undo command, because
   ;; otherwise an undone change shows up as changed.  While the properties
@@ -670,8 +670,8 @@ Passive state - means changes are kept and new ones recorded but are
 Functions:
 \\[highlight-changes-next-change] - move point to beginning of next change
 \\[highlight-changes-previous-change] - move to beginning of previous change 
-\\[compare-with-file] - mark text as changed by comparing this buffer with
-       the contents of a file
+\\[highlight-compare-with-file] - mark text as changed by comparing this
+       buffer with the contents of a file
 \\[highlight-changes-remove-highlight] - remove the change face from the region
 \\[highlight-changes-rotate-faces] - rotate different \"ages\" of changes \
 through 
@@ -858,8 +858,8 @@ buffer to be saved):
 ;; This uses ediff to find the differences.
 
 ;;;###autoload
-(defun compare-with-file (file-b)
-  "Compare this buffer with a file.
+(defun highlight-compare-with-file (file-b)
+  "Compare this buffer with a file, and highlight differences.
 
 The current buffer must be an unmodified buffer visiting a file,
 and not in read-only mode.