Commits

michaelk  committed 3b3ace8

* ediff-util.el
(ediff-file-checked-out-p,ediff-file-checked-in-p): check if
vc-state is available.
(ediff-make-temp-file): use ediff-coding-system-for-write.

* ediff-init.el (ediff-coding-system-for-read): from ediff-diff.el
(ediff-coding-system-for-write): new variable.
(ediff-highest-priority): fixed the bug having to do with disappearing
overlays.
(ediff-file-remote-p): use file-remote-p, if available.
(ediff-listable-file): new function.
(ediff-file-attributes): use ediff-listable-file.

* ediff-mult.el (ediff-meta-insert-file-info1): use
ediff-listable-file.

* ediff-ptch.el (ediff-prompt-for-patch-file): use
ediff-coding-system-for-read.
(ediff-patch-file-internal): use ediff-coding-system-for-write.

* ediff-diff.el (ediff-coding-system-for-read): moved to ediff-init.el.
(ediff-match-diff3-line,ediff-get-diff3-group): improved pattern.

* ediff.texi: added clarifications, acknowledgements.

  • Participants
  • Parent commits ebea621

Comments (0)

Files changed (13)

+2001-07-21  Michael Kifer  <kifer@cs.sunysb.edu>
+	
+	* ediff-util.el
+	(ediff-file-checked-out-p,ediff-file-checked-in-p): check if 
+	vc-state is available.
+	(ediff-make-temp-file): use ediff-coding-system-for-write.
+	
+	* ediff-init.el (ediff-coding-system-for-read): from ediff-diff.el
+	(ediff-coding-system-for-write): new variable.
+	(ediff-highest-priority): fixed the bug having to do with disappearing
+	overlays.
+	(ediff-file-remote-p): use file-remote-p, if available.
+	(ediff-listable-file): new function.
+	(ediff-file-attributes): use ediff-listable-file.
+	
+	* ediff-mult.el (ediff-meta-insert-file-info1): use
+	ediff-listable-file.
+	
+	* ediff-ptch.el (ediff-prompt-for-patch-file): use
+	ediff-coding-system-for-read.
+	(ediff-patch-file-internal): use ediff-coding-system-for-write.
+	
+	* ediff-diff.el (ediff-coding-system-for-read): moved to ediff-init.el.
+	(ediff-match-diff3-line,ediff-get-diff3-group): improved pattern.
+	
+	* ediff.texi: added clarifications, acknowledgements.
+	
 2001-04-08  Steve Youngs  <youngs@xemacs.org>
 
 	* Makefile (REQUIRES): Add prog-modes because diff-mode.el

File ediff-diff.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 
 (provide 'ediff-diff)
   :type 'string
   :group 'ediff-diff)
 
-(defcustom ediff-coding-system-for-read 'raw-text
-  "*The coding system for read to use when running the diff program as a subprocess. 
-In most cases, the default will do. However, under certain circumstances in
-Windows NT/98/95 you might need to use something like 'raw-text-dos here.
-So, if the output that your diff program sends to Emacs contains extra ^M's,
-you might need to experiment here, if the default or 'raw-text-dos doesn't
-work."
-  :type 'symbol
-  :group 'ediff-diff)
 
 ;; The following functions must precede all defcustom-defined variables.
 
 
 ;;; Support for diff3
 
-(defvar ediff-match-diff3-line "^====\\(.?\\)$"
+(defvar ediff-match-diff3-line "^====\\(.?\\)\C-m?$"
   "Pattern to match lines produced by diff3 that describe differences.")
 (defcustom ediff-diff3-options ""  
   "*Options to pass to `ediff-diff3-program'."
   ;; can produce the groups in the order 1, 2, 3 or 1, 3, 2.
   (save-excursion
     (re-search-forward
-     (concat "^" file ":\\([0-9]+\\)\\(,\\([0-9]+\\)\\)?\\([ac]\\)$"))
+     (concat "^" file ":\\([0-9]+\\)\\(,\\([0-9]+\\)\\)?\\([ac]\\)\C-m?$"))
     (beginning-of-line 2)
     ;; treatment depends on whether it is an "a" group or a "c" group
     (if (string-equal (buffer-substring (match-beginning 4) (match-end 4)) "c")
 ;;; End:
 
 
-;; ediff-diff.el ends here
+;;; ediff-diff.el ends here

File ediff-help.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 	 
 (provide 'ediff-help)

File ediff-hook.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 
 ;;;   These must be placed in menu-bar.el in Emacs
 
 (provide 'ediff-hook)
 
-
 ;;; ediff-hook.el ends here

File ediff-init.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 
 ;; Start compiler pacifier
   :type 'symbol
   :group 'ediff)
 
+(defcustom ediff-coding-system-for-read 'raw-text
+  "*The coding system for read to use when running the diff program as a subprocess. 
+In most cases, the default will do. However, under certain circumstances in
+Windows NT/98/95 you might need to use something like 'raw-text-dos here.
+So, if the output that your diff program sends to Emacs contains extra ^M's,
+you might need to experiment here, if the default or 'raw-text-dos doesn't
+work."
+  :type 'symbol
+  :group 'ediff)
+
+(defcustom ediff-coding-system-for-write 'no-conversion
+  "*The coding system for write to use when writing out difference regions
+to temp files when Ediff needs to find fine differences."
+  :type 'symbol
+  :group 'ediff)
+
 
 (if ediff-xemacs-p
     (progn
 (ediff-defvar-local ediff-current-diff-overlay-Ancestor nil
   "Overlay for the current difference region in the ancestor buffer.")
 
-;; Compute priority of ediff overlay.
+;; Compute priority of a current ediff overlay.
 (defun ediff-highest-priority (start end buffer)
   (let ((pos (max 1 (1- start)))
 	ovr-list)
 	(while (< pos (min (point-max) (1+ end)))
 	  (setq ovr-list (append (overlays-at pos) ovr-list))
 	  (setq pos (next-overlay-change pos)))
-	(1+ (apply '+
-		   (mapcar (lambda (ovr)
-			     (if ovr
-				 (or (ediff-overlay-get ovr 'priority) 0)
-			       0))
-			   ovr-list)
-		   ))
+	(+ 1 ediff-shadow-overlay-priority
+	   (apply 'max
+		  (mapcar
+		   (lambda (ovr)
+		     (if (and ovr
+			      ;; exclude ediff overlays from priority
+			      ;; calculation, or else priority will keep
+			      ;; increasing
+			      (null (ediff-overlay-get ovr 'ediff))
+			      (null (ediff-overlay-get ovr 'ediff-diff-num)))
+			 ;; use the overlay priority or 0
+			 (or (ediff-overlay-get ovr 'priority) 0)
+		       0))
+		   ovr-list)
+		  ))
 	))))
 
 
 
 ;;; In-line functions
 
-(or (fboundp 'ediff-file-remote-p) ; user supplied his own function: use it
-    (defun ediff-file-remote-p (file-name)
+;; If file-remote-p is defined (as in XEmacs, use it. Otherwise, check
+;; if find-file-name-handler is defined for 'file-local-copy
+(defun ediff-file-remote-p (file-name)
+  (or (and (fboundp 'file-remote-p) (file-remote-p file-name))
       (find-file-name-handler file-name 'file-local-copy)))
-;;;      (or (and (featurep 'efs-auto) (efs-ftp-path file-name))
-;;;	  (and (featurep 'tramp) (tramp-tramp-file-p file-name))
-;;;	  (and (fboundp 'file-remote-p) (file-remote-p file-name))
-;;;	  ;; Can happen only in Emacs, since XEmacs has file-remote-p
-;;;	  (and (require 'ange-ftp) (ange-ftp-ftp-name file-name)))))
+
+;; File for which we can get attributes, such as size or date
+(defun ediff-listable-file (file-name)
+  (let ((handler (find-file-name-handler file-name 'file-local-copy)))
+    (or (null handler) (eq handler 'dired-handler-fn))))
 
 
 (defsubst ediff-frame-unsplittable-p (frame)
       (apply 'message string args)))
 
 (defun ediff-file-attributes (filename attr-number)
-  (if (ediff-file-remote-p filename)
-      -1
-    (nth attr-number (file-attributes filename))))
+  (if (ediff-listable-file filename)
+      (nth attr-number (file-attributes filename))
+    -1)
+  )
 
 (defsubst ediff-file-size (filename)
   (ediff-file-attributes filename 7))
 
 (provide 'ediff-init)
 
-
-;;; ediff-init.el  ends here
+;;; ediff-init.el ends here

File ediff-merg.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 
 (provide 'ediff-merg)
 ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
 ;;; End:
 
-;; ediff-merg.el ends here
+;;; ediff-merg.el ends here

File ediff-mult.el

 			      500))
 	file-modtime file-size)
     (cond ((not (stringp fname)) (setq file-size -2)) ; file doesn't exits
-	  ((not (ediff-file-remote-p fname))
+	  ((ediff-listable-file fname)
 	   (if (file-exists-p fname)
 	       ;; set real size and modtime
 	       (setq file-size (ediff-file-size fname)

File ediff-ptch.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
 
 ;;; Code:
 	 
 (defun ediff-prompt-for-patch-file ()
   (let ((dir (cond (ediff-patch-default-directory) ; try patch default dir
 		   (ediff-use-last-dir ediff-last-dir-patch)
-		   (t default-directory))))
+		   (t default-directory)))
+	(coding-system-for-read ediff-coding-system-for-read))
     (find-file-noselect
      (read-file-name
       (format "Patch is in file:%s "
 	       (goto-char (point-min))
 	       (and (re-search-forward ediff-context-diff-label-regexp nil t)
 		    (current-buffer)))))
-	  (t (other-buffer (current-buffer) 'visible-ok)))
+	  (t (ediff-other-buffer (current-buffer))))
     'must-match)))
 
 
 	 ;; file for the purpose of patching.
 	 (true-source-filename source-filename)
 	 (target-filename source-filename)
+	 ;; this ensures that the patch process gets patch buffer in the
+	 ;; encoding that Emacs thinks is right for that type of text
+	 (coding-system-for-write 
+	  (if (boundp 'buffer-file-coding-system) buffer-file-coding-system))
 	 target-buf buf-to-patch file-name-magic-p 
 	 patch-return-code ctl-buf backup-style aux-wind)
 	  

File ediff-util.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 	 
 (provide 'ediff-util)
 	       (expand-file-name merge-buffer-file)))
 	;; check the directory exists
 	(or (file-exists-p (file-name-directory merge-buffer-file))
-	    (error "Directory %s given as place to save the merge doesn't exist."
+	    (error "Directory %s given as place to save the merge doesn't exist"
 		   (abbreviate-file-name 
 		    (file-name-directory merge-buffer-file))))
 	(if (and (file-exists-p merge-buffer-file)
 (defsubst ediff-file-checked-out-p (file)
   (or (not (featurep 'vc-hooks))
       (and (vc-backend file)
-           (or (memq (vc-state file) '(edited needs-merge))
-               (stringp (vc-state file))))))
+	   (if (fboundp 'vc-state)
+	       (or (memq (vc-state file) '(edited needs-merge))
+		   (stringp (vc-state file)))
+	     ;; XEmacs has no vc-state
+	     (vc-locking-user file))
+	   )))
   
 (defsubst ediff-file-checked-in-p (file)
   (and (featurep 'vc-hooks)
        ;; CVS files are considered not checked in
        (not (memq (vc-backend file) '(nil CVS)))
-       (not (memq (vc-state file) '(edited needs-merge)))
-       (not (stringp (vc-state file)))))
+       (if (fboundp 'vc-state)
+	   (progn
+	     (not (memq (vc-state file) '(edited needs-merge)))
+	     (not (stringp (vc-state file))))
+	 ;; XEmacs has no vc-state
+	 (not (vc-locking-user file)))
+       ))
 
 (defun ediff-file-compressed-p (file)
   (condition-case nil
 (defun ediff-make-temp-file (buff &optional prefix given-file start end)
   (let* ((p (ediff-convert-standard-filename (or prefix "ediff")))
 	 (short-p p)
-	 (coding-system-for-write 'no-conversion)
+	 (coding-system-for-write ediff-coding-system-for-write)
 	 f short-f)
     (if (and (fboundp 'msdos-long-file-names)
 	     (not (msdos-long-file-names))
 	  ;; never detach
 	  (ediff-overlay-put
 	   overl (if ediff-emacs-p 'evaporate 'detachable) nil)
-	  ;; make vip-minibuffer-overlay open-ended
+	  ;; make overlay open-ended
 	  ;; In emacs, it is made open ended at creation time
 	  (if ediff-xemacs-p
 	      (progn

File ediff-vers.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
 
 ;;; Code:
 

File ediff-wind.el

 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 	 
 (provide 'ediff-wind)
 ;; Created: February 2, 1994
 ;; Keywords: comparing, merging, patching, tools, unix
 
-(defconst ediff-version "2.75" "The current version of Ediff")
-(defconst ediff-date "March 5, 2001" "Date of last update")  
+(defconst ediff-version "2.76" "The current version of Ediff")
+(defconst ediff-date "July 18, 2001" "Date of last update")  
 
 
 ;; This file is part of GNU Emacs.
 @synindex vr cp
 @synindex fn cp
 @synindex pg cp
+@synindex ky cp
 
 @dircategory Editors
 @direntry
 This file documents Ediff, a comprehensive visual interface to Unix diff
 and patch utilities.
 
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
+Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission notice
-identical to this one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU
+Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
+license is included in the section entitled ``GNU Free Documentation
+License'' in the Emacs manual.
 
-@end ignore
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
+
+This document is part of a collection distributed under the GNU Free
+Documentation License.  If you want to distribute this document
+separately from the collection, you can do so by adding a copy of the
+license to the document, as described in section 6 of the license.
 @end ifinfo
 
 @iftex
 
 @vskip 0pt plus 1filll
 @noindent
-Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU
+Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
+license is included in the section entitled ``GNU Free Documentation
+License'' in the Emacs manual.
+
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
+
+This document is part of a collection distributed under the GNU Free
+Documentation License.  If you want to distribute this document
+separately from the collection, you can do so by adding a copy of the
+license to the document, as described in section 6 of the license.
 @end titlepage
 @page
 @end iftex
 @node Major Entry Points, Session Commands, Introduction, Top
 @chapter Major Entry Points
 
+When Ediff starts up, it displays a small control window, which accepts the
+Ediff commands and two or three windows displaying the files to be compared
+or merged. The control window can be in its own small frame or it can be
+part of a bigger frame that displays other buffers. In any case, it is
+important that the control window be active (i.e., be the one receiving the
+keystrokes) when you use Ediff. You can switch to other Emacs buffers at
+will and even edit the files currently being compared with Ediff and then
+switch back to Ediff at any time by activating the appropriate Emacs windows.
+
 Ediff can be invoked interactively using the following functions, which can
 be run either from the minibuffer or from the menu bar.  In the menu bar,
 all Ediff's entry points belong to three submenus of the Tools menu:
 
 @table @kbd
 @item ?
+@kindex ?
 Toggles the Ediff Quick Help window ON and OFF.
 @item G
+@kindex G
 Prepares a mail buffer for sending a praise or a curse to the Ediff maintainer.
 
 @item E
+@kindex E
 Brings up the top node of this manual, where you can find further
 information on the various Ediff functions and advanced issues, such as
 customization, session groups, etc.
 
 @item v
+@kindex v
 Scrolls up buffers A and B (and buffer C where appropriate) in a
 coordinated fashion.
 @item V
+@kindex V
 Scrolls the buffers down.
 
 @item <
+@kindex <
 Scrolls the buffers to the left simultaneously.
 @item >
+@kindex >
 Scrolls buffers to the right.
 
 @item wd
+@kindex wd
 Saves the output from the diff utility, for further reference.
 
 With prefix argument, saves the plain output from @code{diff} (see
 it is available.
 
 @item wa
+@kindex wa
 Saves buffer A, if it was modified.
 @item wb
+@kindex wb
 Saves buffer B, if it was modified.
 @item wc
+@kindex wc
 Saves buffer C, if it was modified (if you are in a session that
 compares three files simultaneously).
 
 @item a
+@kindex a
 @emph{In comparison sessions:}
 Copies the current difference region (or the region specified as the prefix
 to this command) from buffer A to buffer B.
 this region in buffer C can be restored via the command @kbd{r}.
 
 @item b
+@kindex b
 Works similarly, but copies the current difference region from buffer B to
 buffer A (in @emph{comparison sessions}) or the merge buffer (in
 @emph{merge sessions}).
 @kbd{r} in merge sessions.
 
 @item ab
+@kindex ab
 Copies the current difference region (or the region specified as the prefix
 to this command) from buffer A to buffer B.  This (and the next five)
 command is enabled only in sessions that compare three files
 simultaneously.  The old region in buffer B is saved and can be restored
 via the command @kbd{rb}.
 @item ac
+@kindex ac
 Copies the difference region from buffer A to buffer C.
 The old region in buffer C is saved and can be restored via the command
 @kbd{rc}.
 @item ba
+@kindex ba
 Copies the difference region from buffer B to buffer A.
 The old region in buffer A is saved and can be restored via the command
 @kbd{ra}.
 @item bc
+@kindex bc
 Copies the difference region from buffer B to buffer C.
 The command @kbd{rc} undoes this.
 @item ca
+@kindex ca
 Copies the difference region from buffer C to buffer A.
 The command @kbd{ra} undoes this.
 @item cb
+@kindex cb
 Copies the difference region from buffer C to buffer B.
 The command @kbd{rb} undoes this.
 
 @item p
 @itemx DEL
+@kindex p
+@kindex DEL
 Makes the previous difference region current.
 @item n
 @itemx SPC
+@kindex n
+@kindex SPC
 Makes the next difference region current.
 
 @item j
 @itemx -j
 @itemx Nj
+@kindex j
 Makes the very first difference region current.
 
 @kbd{-j} makes the last region current.  Typing a number, N, and then `j'
 `j' makes current the region Last - N.
 
 @item ga
+@kindex ga
 Makes current the difference region closest to the position of the point in
 buffer A.
 
 this case, the variants will be positioned so that each would display this
 area (of agreement).
 @item gb
+@kindex gb
 Makes current the difference region closest to the position of the point in
 buffer B.
 
 With a prefix argument, behaves like @kbd{ga}, but with respect to buffer B.
 @item gc
+@kindex gc
 @emph{In merge sessions:}
 makes current the difference region closest to the point in the merge buffer.
 
 With a prefix argument, behaves like @kbd{ga}, but with respect to buffer C.
 
 @item !
+@kindex !
 Recomputes the difference regions, bringing them up to date.  This is often
 needed because it is common to do all sorts of editing during Ediff
 sessions, so after a while, the highlighted difference regions may no
 longer reflect the actual differences among the buffers.
 
 @item *
+@kindex *
 Forces refinement of the current difference region, which highlights the exact
 words of disagreement among the buffers.  With a negative prefix argument,
 unhighlights the current region.
 no longer current, due to user editing.
 
 @item m
+@kindex m
 Displays the current Ediff session in a frame as wide as the physical
 display.  This is useful when comparing files side-by-side.  Typing `m' again
 restores the original size of the frame.
 
 @item |
+@kindex |
 Toggles the horizontal/vertical split of the Ediff display.  Horizontal
 split is convenient when it is possible to compare files
 side-by-side.  If the frame in which files are displayed is too narrow
 and lines are cut off, typing @kbd{m} may help some.
 
 @item @@
+@kindex @@
 Toggles auto-refinement of difference regions (i.e., automatic highlighting
 of the exact words that differ among the variants).  Auto-refinement is
 turned off on devices where Emacs doesn't support highlighting.
 @kbd{*}.
 
 @item h
+@kindex h
 Cycles between full highlighting, the mode where fine differences are not
 highlighted (but computed), and the mode where highlighting is done with
 ASCII strings.  The latter is not really recommended, unless on a dumb TTY.
 
 @item r
+@kindex r
 Restores the old contents of the region in the merge buffer.
 (If you copied a difference region from buffer A or B into the merge buffer
 using the commands @kbd{a} or @kbd{b}, Ediff saves the old contents of the
 This command is enabled in merge sessions only.
 
 @item ra
+@kindex ra
 Restores the old contents of the current difference region in buffer A,
 which was previously saved when the user invoked one of these commands:
 @kbd{b}, @kbd{ba}, @kbd{ca}, which see.  This command is enabled in
 comparison sessions only.
 @item rb
+@kindex rb
 Restores the old contents of the current difference region in buffer B,
 which was previously saved when the user invoked one of these commands:
 @kbd{a}, @kbd{ab}, @kbd{cb}, which see.  This command is enabled in
 comparison sessions only.
 @item rc
+@kindex rc
 Restores the old contents of the current difference region in buffer C,
 which was previously saved when the user invoked one of these commands:
 @kbd{ac}, @kbd{bc}, which see.  This command is enabled in 3-file
 comparison sessions only.
 
 @item ##
+@kindex ##
 Tell Ediff to skip over regions that disagree among themselves only in the
 amount of white space and line breaks.
 
 
 @item #h
 @itemx #f
+@kindex #f
+@kindex #h
 Ediff works hard to ameliorate the effects of boredom in the workplace...
 
 Quite often differences are due to identical replacements (e.g., the word
 over.  @xref{Selective Browsing}, for more.
 
 @item A
+@kindex A
 Toggles the read-only property in buffer A.
 If file A is under version control and is checked in, it is checked out
 (with your permission).
 @item B
+@kindex B
 Toggles the read-only property in buffer B.
 If file B is under version control and is checked in, it is checked out.
 @item C
+@kindex C
 Toggles the read-only property in buffer C (in 3-file comparison sessions).
 If file C is under version control and is checked in, it is checked out.
 
 @item ~
+@kindex ~
 Swaps the windows where buffers A and B are displayed.  If you are comparing
 three buffers at once, then this command would rotate the windows among
 buffers A, B, and C.
 
 @item i
+@kindex i
 Displays all kinds of useful data about the current Ediff session.
 @item D
+@kindex D
 Runs @code{ediff-custom-diff-program} on the variants and displays the
 buffer containing the output.  This is useful when you must send the output
 to your Mom.
 @xref{Patch and Diff Programs}, for details.
 
 @item R
+@kindex R
 Displays a list of currently active Ediff sessions---the Ediff Registry.
 You can then restart any of these sessions by either clicking on a session
 record or by putting the cursor over it and then typing the return key.
 minibuffer: @kbd{M-x eregistry}.  @xref{Registry of Ediff Sessions}.
 
 @item M
+@kindex M
 Shows the session group buffer that invoked the current Ediff session.
 @xref{Session Groups}, for more information on session groups.
 
 @item z
+@kindex z
 Suspends the current Ediff session.  (If you develop a condition known as
 Repetitive Ediff Injury---a serious but curable illness---you must change
 your current activity.  This command tries hard to hide all Ediff-related
 The easiest way to resume a suspended Ediff session is through the registry
 of active sessions.  @xref{Registry of Ediff Sessions}, for details.
 @item q
+@kindex q
 Terminates this Ediff session.  With a prefix argument (e.g.,@kbd{1q}), asks
 if you also want to delete the buffers of the variants.
 Modified files and the results of merges are never deleted.
 
 @item %
+@kindex %
 Toggles narrowing in Ediff buffers.  Ediff buffers may be narrowed if you
 are comparing only parts of these buffers via the commands
 @code{ediff-windows-*} and @code{ediff-regions-*}, which see.
 
 @item C-l
+@kindex C-l
 Restores the usual Ediff window setup.  This is the quickest way to resume
 an Ediff session, but it works only if the control panel of that session is
 visible.
 
 @item $$
+@kindex $$
 While merging with an ancestor file, Ediff is determined to reduce user's
 wear and tear by saving him and her much of unproductive, repetitive
 typing.  If it notices that, say, file A's difference region is identical to
 it.  Typing @kbd{$$} again undoes this setting.
 
 @item $*
+@kindex $*
 When merging files with large number of differences, it is sometimes
 convenient to be able to skip the difference regions for which you already
 decided which variant is most appropriate. Typing @kbd{$*} will accomplish
 region in buffer A, etc.
 
 @item /
+@kindex /
 Displays the ancestor file during merges.
 @item &
+@kindex &
 In some situations, such as when one of the files agrees with the ancestor file
 on a difference region and the other doesn't, Ediff knows what to do: it copies
 the current difference region from the second buffer into the merge buffer.
 corresponding region from buffer B.
 
 @item s
+@kindex s
 Causes the merge window shrink to its minimum size, thereby exposing as much
 of the variant buffers as possible.  Typing `s' again restores
 the original size of that window.
 the variable @code{ediff-merge-window-share}, which see.
 
 @item +
+@kindex +
 Combines the difference regions from buffers A and B and copies the
 result into the merge buffer.  @xref{Merging and diff3}, and the
 variables @code{ediff-combine-diffs} and @code{ediff-combination-pattern}.
 
 
 @item =
+@kindex =
 You may run into situations when a large chunk of text in one file has been
 edited and then moved to a different place in another file.  In such a case,
 these two chunks of text are unlikely to belong to the same difference
 Ediff would take the current region in the merge buffer and compare
 it to the current region in the buffer of your choice (A or B).
 
+@emph{Note: In all these cases you must first switch to the appropriate
+Emacs buffers and manually set the regions that you want to compare.}
+
 Highlighting set by the parent Ediff session is removed, to avoid interference
 with highlighting of the child session.  When done with the child session, type
 @kbd{C-l} in the parent's control panel to restore the original highlighting.
 This function can also be invoked from the Menubar.  However, in some
 cases, the change will take place only after you execute one of the Ediff
 commands, such as going to the next difference or redisplaying.
+
 @item ediff-toggle-use-toolbar
 @findex ediff-toggle-use-toolbar
 Available in XEmacs only.  The Ediff toolbar provides quick access to some
 template determine the text that separates the aforesaid regions. The
 default template is
 
-@example
-("@value{seven-left} variant A" A "@value{seven-right} variant B" B  "####### Ancestor" Ancestor "======= end")
-@end example
+@smallexample
+("@value{seven-left} variant A" A "@value{seven-right} variant B" B
+   "####### Ancestor" Ancestor "======= end")
+@end smallexample
 
-and the corresponding combined region is shown above. The order in which 
-the regions are shown (and the separator strings) can be changed by
-changing the above template. It is even possible to add or delete region
-specifiers in this template (although the only possibly useful such
-modification seems to be the deletion of the ancestor).
+@noindent
+(this is one long line) and the corresponding combined region is shown
+above. The order in which the regions are shown (and the separator
+strings) can be changed by changing the above template. It is even
+possible to add or delete region specifiers in this template (although
+the only possibly useful such modification seems to be the deletion of
+the ancestor).
 
 In addition to the state of the difference, Ediff displays the state of the
 merge for each region.  If a difference came from buffer A by default
 Fritz Knabe (Fritz.Knabe@@ecrc.de),
 Heinz Knutzen (hk@@informatik.uni-kiel.d400.de),
 Andrew Koenig (ark@@research.att.com),
+Hannu Koivisto (azure@@iki.fi),
 Ken Laprade (laprade@@dw3f.ess.harris.com),
 Will C Lauer (wcl@@cadre.com),
 Richard Levitte (levitte@@e.kth.se),
 Mike Long (mike.long@@analog.com),
 Martin Maechler (maechler@@stat.math.ethz.ch),
 Simon Marshall (simon@@gnu.org),
+Paul C. Meuse (pmeuse@@delcomsys.com),
 Richard Mlynarik (mly@@adoc.xerox.com),
 Stefan Monnier (monnier@@cs.yale.edu),
 Chris Murphy (murphycm@@sun.aston.ac.uk),