Commits

Anonymous committed 04b34de

* ediff-mult.el (ediff-default-filtering-regexp): new variable.

* ediff-util.el (ediff-maybe-save-and-delete-merge): change in a
message.

* ediff.el (ediff-directories,ediff-directory-revisions,
ediff-directories3,ediff-merge-directories,
ediff-merge-directories-with-ancestor,ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor): make use of the new
ediff-default-filtering-regexp variable.

* all files: eliminated trailing blanks in various lines.

Comments (0)

Files changed (13)

+2003-05-18  Michael Kifer  <kifer@cs.stonybrook.edu>
+	
+	* ediff-mult.el (ediff-default-filtering-regexp): new variable.
+	
+	* ediff-util.el (ediff-maybe-save-and-delete-merge): change in a
+	message.
+	
+	* ediff.el (ediff-directories,ediff-directory-revisions,
+	ediff-directories3,ediff-merge-directories,
+	ediff-merge-directories-with-ancestor,ediff-merge-directory-revisions,
+	ediff-merge-directory-revisions-with-ancestor): make use of the new
+	ediff-default-filtering-regexp variable.
+	
+	* all files: eliminated trailing blanks in various lines.
+	
 2003-03-09  Ben Wing  <ben@xemacs.org>
 
 	* Makefile:
   :group 'ediff-diff)
 
 (defcustom ediff-diff-options ""
-  "*Options to pass to `ediff-diff-program'. 
+  "*Options to pass to `ediff-diff-program'.
 If Unix diff is used as `ediff-diff-program', then the most useful options are
 `-w', to ignore space, and `-i', to ignore case of letters.
 At present, the option `-c' is not allowed."
 ;; the status can be =diff(A), =diff(B), or =diff(A+B)
 (ediff-defvar-local ediff-diff-status "" "")
 
-  
+
 ;;; Fine differences
 
 (ediff-defvar-local ediff-auto-refine (if (ediff-has-face-support-p) 'on 'nix)
 
 (ediff-defvar-local ediff-auto-refine-limit 1400
   "*Auto-refine only the regions of this size \(in bytes\) or less.")
-  
+
 ;;; General
 
 (defvar ediff-diff-ok-lines-regexp
 file-C. It may ignore file C for diff2 jobs. It should also take
 one optional arguments, diff-number to refine.")
 
-  
+
 ;;; Functions
 
 ;; Generate the difference vector and overlays for the two files
   ;; looking either for '-c' or a 'c' in a set of clustered non-long options
   (if (string-match "^-c\\| -c\\|-[^- ]+c" ediff-diff-options)
       (error "Option `-c' is not allowed in `ediff-diff-options'"))
-						  
+
   ;; create, if it doesn't exist
   (or (ediff-buffer-live-p ediff-diff-buffer)
       (setq ediff-diff-buffer
 	     (message "")
 	     (ediff-with-current-buffer diff-buffer
 	       (buffer-size))))))
-  
 
-     
+
+
 ;; If file-A/B/C is nil, do 2-way comparison with the non-nil buffers
 ;; This function works for diff3 and diff2 jobs
 (defun ediff-setup-fine-diff-regions (file-A file-B file-C reg-num)
       (setq ediff-fine-diff-buffer
 	    (get-buffer-create
 	     (ediff-unique-buffer-name "*ediff-fine-diff" "*"))))
-  
+
   (let (diff3-job diff-program diff-options ok-regexp diff-list)
     (setq diff3-job ediff-3way-job
 	  diff-program (if diff3-job ediff-diff3-program ediff-diff-program)
 	  ok-regexp (if diff3-job
 			ediff-diff3-ok-lines-regexp
 			ediff-diff-ok-lines-regexp))
-    
+
     (ediff-message-if-verbose "Refining difference region %d ..." (1+ reg-num))
     (ediff-exec-process diff-program ediff-fine-diff-buffer 'synchronize
 			diff-options
 			(if diff3-job
 			    (if file-C file-C file-B))
 			) ; exec process
-  
+
     (ediff-prepare-error-list ok-regexp ediff-fine-diff-buffer)
     (ediff-message-if-verbose
      "")
     ;; "Refining difference region %d ... done" (1+ reg-num))
-    
+
     (setq diff-list
 	  (if diff3-job
 	      (ediff-extract-diffs3
 			 (aset elt 5 nil))
 		       (cdr diff-list)))
 	  ))
-    
+
     (ediff-convert-fine-diffs-to-overlays diff-list reg-num)
     ))
-  
-    
+
+
 (defun ediff-prepare-error-list (ok-regexp diff-buff)
   (or (ediff-buffer-live-p ediff-error-buffer)
       (setq ediff-error-buffer
 	(c-prev 1)
 	diff-list shift-A shift-B
 	)
- 
+
     ;; diff list contains word numbers, unless changed later
     (setq diff-list (cons (if word-mode 'words 'points)
 			  diff-list))
 	      shift-B
 	      (ediff-overlay-start
 	       (ediff-get-value-according-to-buffer-type 'B bounds))))
-    
+
     ;; reset point in buffers A/B/C
     (ediff-with-current-buffer A-buffer
       (goto-char (if shift-A shift-A (point-min))))
     (if (ediff-buffer-live-p C-buffer)
 	(ediff-with-current-buffer C-buffer
 	  (goto-char (point-min))))
-    
+
     (ediff-with-current-buffer diff-buffer
       (goto-char (point-min))
       (while (re-search-forward ediff-match-diff-line nil t)
 	     ;; (string-equal diff-type "c")
 	     (setq a-end (1+ a-end)
 		   b-end (1+ b-end))))
-		   
+
 	 (if (eq ediff-default-variant 'default-B)
 	     (setq c-begin b-begin
 		   c-end b-end)
 	   (setq c-begin a-begin
 		 c-end a-end))
-	 
+
 	 ;; compute main diff vector
 	 (if word-mode
 	     ;; make diff-list contain word numbers
 			     nil	; dummy state of ancestor
 			     )))
 		  )))
-		  
+
 	 ))) ; end ediff-with-current-buffer
     diff-list
     ))
-    
+
 
 (defun ediff-convert-diffs-to-overlays (diff-list)
   (ediff-set-diff-overlays-in-one-buffer 'A diff-list)
 	     )))
   (message "Processing difference regions ... done"))
 
-  
+
 (defun ediff-set-diff-overlays-in-one-buffer (buf-type diff-list)
   (let* ((current-diff -1)
 	 (buff (ediff-get-buffer buf-type))
 
     (setq diff-list (cdr diff-list)) ; discard diff list type
     (setq total-diffs (length diff-list))
-      
+
     ;; shift, if necessary
     (ediff-with-current-buffer buff (setq pt-saved shift))
-	   
+
     (while diff-list
       (setq current-diff (1+ current-diff)
 	    list-element (car diff-list)
 						  (t 7)))  ; Ancestor
 	    state-of-diff (aref list-element 8)
 	    )
-		
+
       (cond ((and (not (eq buf-type state-of-diff))
 		  (not (eq buf-type 'Ancestor))
 		  (memq state-of-diff '(A B C)))
 	     (setq state-of-diff (format "=diff(%S)" state-of-diff))
 	     )
 	    (t (setq state-of-diff nil)))
-	    
+
       ;; Put overlays at appropriate places in buffer
       ;; convert word numbers to points, if necessary
       (if (eq diff-list-type 'words)
 	    (if (> begin end) (setq begin end))
 	    (setq pt-saved (ediff-with-current-buffer buff (point)))))
       (setq overlay (ediff-make-bullet-proof-overlay begin end buff))
-      
+
       (ediff-overlay-put overlay 'priority ediff-shadow-overlay-priority)
       (ediff-overlay-put overlay 'ediff-diff-num current-diff)
       (if (and (ediff-has-face-support-p)
 	    diff-list
 	    (cdr diff-list))
       ) ; while
-      
+
     (set (ediff-get-symbol-from-alist buf-type ediff-difference-vector-alist)
 	 (vconcat diff-overlay-list))
     ))
 ;; if `flag' is 'skip then don't compute fine diffs for this region.
 (defun ediff-make-fine-diffs (&optional n flag)
   (or n  (setq n ediff-current-difference))
-  
+
   (if (< ediff-number-of-differences 1)
       (error ediff-NO-DIFFERENCES))
-      
+
   (if ediff-word-mode
       (setq flag 'skip
 	    ediff-auto-refine 'nix))
-  
+
   (or (< n 0)
       (>= n ediff-number-of-differences)
       ;; n is within the range
 	    (whitespace-B (ediff-whitespace-diff-region-p n 'B))
 	    (whitespace-C (ediff-whitespace-diff-region-p n 'C))
 	    cumulative-fine-diff-length)
-	
+
 	(cond ;; If one of the regions is empty (or 2 in 3way comparison)
 	      ;; then don't refine.
 	      ;; If the region happens to be entirely whitespace or empty then
 		ediff-control-buffer)
 	       (setq file-A
 		     (ediff-make-temp-file tmp-buffer "fineDiffA" file-A))
-	       
+
 	       (ediff-wordify
 		(ediff-get-diff-posn 'B 'beg n)
 		(ediff-get-diff-posn 'B 'end n)
 		ediff-control-buffer)
 	       (setq file-B
 		     (ediff-make-temp-file tmp-buffer "fineDiffB" file-B))
-	       
+
 	       (if ediff-3way-job
 		   (progn
 		     (ediff-wordify
 		     (setq file-C
 			   (ediff-make-temp-file
 			    tmp-buffer "fineDiffC" file-C))))
-	       
+
 	       ;; save temp file names.
 	       (setq ediff-temp-file-A file-A
 		     ediff-temp-file-B file-B
 		     ediff-temp-file-C file-C)
-	       
+
 	       ;; set the new vector of fine diffs, if none exists
 	       (cond ((and ediff-3way-job whitespace-A)
 		      (ediff-setup-fine-diff-regions nil file-B file-C n))
 		      (ediff-setup-fine-diff-regions file-A file-B nil n))
 		     (t
 		      (ediff-setup-fine-diff-regions file-A file-B file-C n)))
-		      
+
 	       (setq cumulative-fine-diff-length
 		     (+ (length (ediff-get-fine-diff-vector n 'A))
 			(length (ediff-get-fine-diff-vector n 'B))
 			(if (and file-C (not ediff-merge-job))
 			    (length (ediff-get-fine-diff-vector n 'C))
 			  0)))
-		      
+
 	       (cond ((or
 		       ;; all regions are white space
 		       (and whitespace-A whitespace-B whitespace-C)
 	      ) ; end cond
 	(ediff-set-fine-diff-properties n)
 	)))
-	
+
 ;; Interface to ediff-make-fine-diffs. Checks for auto-refine limit, etc.
 (defun ediff-install-fine-diff-if-necessary (n)
   (cond ((and (eq ediff-auto-refine 'on)
 		    (ediff-get-diff-posn 'B 'beg n))))
 	     (ediff-make-fine-diffs n 'noforce)
 	   (ediff-make-fine-diffs n 'skip)))
-	
+
 	;; highlight iff fine diffs already exist
 	((eq ediff-auto-refine 'off)
 	 (ediff-make-fine-diffs n 'skip))))
-    
-    
+
+
 ;; if fine diff vector is not set for diff N, then do nothing
 (defun ediff-set-fine-diff-properties (n &optional default)
   (or (not (ediff-has-face-support-p))
 	(ediff-set-fine-diff-properties-in-one-buffer 'B n default)
 	(if ediff-3way-job
 	    (ediff-set-fine-diff-properties-in-one-buffer 'C n default)))))
-	
+
 (defun ediff-set-fine-diff-properties-in-one-buffer (buf-type
 						     n &optional default)
   (let ((fine-diff-vector  (ediff-get-fine-diff-vector n buf-type))
 	      (ediff-set-overlay-face overl face)
 	      (ediff-overlay-put overl 'priority priority))
 	    fine-diff-vector)))
-     
+
 ;; Set overlays over the regions that denote delimiters
 (defun ediff-set-fine-overlays-for-combined-merge (diff-list reg-num)
   (let (overlay overlay-list)
     (ediff-set-fine-diff-vector
      reg-num 'C (apply 'vector overlay-list))
     ))
-	
-    
+
+
 ;; Convert diff list to overlays for a given DIFF-REGION
 ;; in buffer of type BUF-TYPE
 (defun ediff-set-fine-overlays-in-one-buffer (buf-type diff-list region-num)
     (ediff-clear-fine-differences-in-one-buffer region-num buf-type)
     (setq diff-list (cdr diff-list)) ; discard list type (words or points)
     (ediff-with-current-buffer buff (goto-char reg-start))
-    
+
     ;; if it is a combined merge then set overlays in buff C specially
     (if (and ediff-merge-job (eq buf-type 'C)
 	     (setq combined-merge-diff-list
 	  (setq overlay (ediff-make-bullet-proof-overlay begin end buff))
 	  ;; record all overlays for this difference region
 	  (setq diff-overlay-list (nconc diff-overlay-list (list overlay))))
-	
+
 	(setq diff-list (cdr diff-list))
 	) ; while
       ;; convert the list of difference information into a vector
 	(anc-prev 1)
 	diff-list shift-A shift-B shift-C
 	)
- 
+
     ;; diff list contains word numbers or points, depending on word-mode
     (setq diff-list (cons (if word-mode 'words 'points)
 			  diff-list))
 	      (if three-way-comp
 		  (ediff-overlay-start
 		   (ediff-get-value-according-to-buffer-type 'C bounds)))))
-    
+
     ;; reset point in buffers A, B, C
     (ediff-with-current-buffer A-buffer
       (goto-char (if shift-A shift-A (point-min))))
     (if (ediff-buffer-live-p anc-buffer)
 	(ediff-with-current-buffer anc-buffer
 	  (goto-char (point-min))))
-    
+
     (ediff-with-current-buffer diff-buffer
       (goto-char (point-min))
       (while (re-search-forward ediff-match-diff3-line nil t)
 		    b-begin-pt b-end-pt
 		    c-begin-pt c-end-pt
 		    anc-begin-pt anc-end-pt)
-		    
+
 	       (setq state-of-ancestor
 		     (= c-or-anc-begin c-or-anc-end))
 
 		     (t
 		      (setq c-begin a-begin
 			    c-end a-end)))
-	 
+
 	       ;; compute main diff vector
 	       (if word-mode
 		   ;; make diff-list contain word numbers
 					)))
 			)))
 	       ))
-	       
+
 	 ))) ; end ediff-with-current-buffer
     diff-list
     ))
-    
+
 ;; Generate the difference vector and overlays for three files
 ;; File-C is either the third file to compare (in case of 3-way comparison)
 ;; or it is the ancestor file.
   (or (ediff-buffer-live-p ediff-diff-buffer)
       (setq ediff-diff-buffer
 	    (get-buffer-create (ediff-unique-buffer-name "*ediff-diff" "*"))))
-  
+
   (message "Computing differences ...")
   (ediff-exec-process ediff-diff3-program ediff-diff-buffer 'synchronize
 		      ediff-diff3-options file-A file-B file-C)
-  
+
   (ediff-prepare-error-list ediff-diff3-ok-lines-regexp ediff-diff-buffer)
   ;;(message "Computing differences ... done")
   (ediff-convert-diffs-to-overlays
     ediff-diff-buffer
     ediff-word-mode ediff-3way-comparison-job ediff-narrow-bounds)
    ))
-   
+
 
 ;; Execute PROGRAM asynchronously, unless OS/2, Windows-*, or DOS, or unless
 ;; SYNCH is non-nil.  BUFFER must be a buffer object, and must be alive.  The
 	      (set-process-filter proc 'ediff-process-filter)
 	      )))
       (store-match-data data))))
-      
+
 ;; This is shell-command-filter from simple.el in Emacs.
 ;; Copied here because XEmacs doesn't have it.
 (defun ediff-process-filter (proc string)
       (if opoint
           (goto-char opoint))
       (set-buffer obuf))))
-      
+
 ;; like shell-command-sentinel but doesn't print an exit status message
 ;; we do this because diff always exits with status 1, if diffs are found
 ;; so shell-command-sentinel displays a confusing message to the user
           (set-buffer (process-buffer process))
           (setq mode-line-process nil))
         (delete-process process))))
-	
+
 
 ;;; Word functions used to refine the current diff
 
      (goto-char (point-min))
      (skip-chars-forward ediff-whitespace)
      (delete-region (point-min) (point))
-     
+
      (while (not (eobp))
        (funcall forward-word-function)
        (setq sv-point (point))
        (skip-chars-forward ediff-whitespace)
        (delete-region sv-point (point))
        (insert "\n")))))
-       
+
 ;; copy string specified as BEG END from IN-BUF to OUT-BUF
 (defun ediff-copy-to-buffer (beg end in-buffer out-buffer)
   (with-current-buffer out-buffer
 ;;; Commentary:
 
 ;;; Code:
-	 
+
 (provide 'ediff-help)
 
 ;; Compiler pacifier start
   "The head of the full help message.")
 (defconst ediff-long-help-message-tail
   "=====================|===========================|=============================
-    R -show registry |     = -compare regions    |  M   -show session group    
-    D -diff output   |     E -browse Ediff manual|  G   -send bug report       
-    i -status info   |     ? -help off           |  z/q -suspend/quit          
+    R -show registry |     = -compare regions    |  M   -show session group
+    D -diff output   |     E -browse Ediff manual|  G   -send bug report
+    i -status info   |     ? -help off           |  z/q -suspend/quit
 -------------------------------------------------------------------------------
 For help on a specific command:  Click Button 2 over it; or
               			 Put the cursor over it and type RET."
   "
 p,DEL -previous diff |     | -vert/horiz split   | xy -copy buf X's region to Y
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
-    j -jump to diff  |     @ -auto-refinement    |  * -refine current region   
-   gx -goto X's point|                           |  ! -update diff regions     
+    j -jump to diff  |     @ -auto-refinement    |  * -refine current region
+   gx -goto X's point|                           |  ! -update diff regions
   C-l -recenter      |    ## -ignore whitespace  |
-  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X              
-  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output        
+  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
+  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
     ~ -rotate buffers|     m -wide display       |
 "
   "Help message usually used for 3-way comparison.
 Normally, not a user option.  See `ediff-help-message' for details.")
-  
+
 (defconst ediff-long-help-message-compare2
   "
 p,DEL -previous diff |     | -vert/horiz split   |a/b -copy A/B's region to B/A
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
-    j -jump to diff  |     @ -auto-refinement    |  * -refine current region   
-   gx -goto X's point|                           |  ! -update diff regions     
+    j -jump to diff  |     @ -auto-refinement    |  * -refine current region
+   gx -goto X's point|                           |  ! -update diff regions
   C-l -recenter      |    ## -ignore whitespace  |
-  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X              
-  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output        
-    ~ -swap variants |     m -wide display       |  
+  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
+  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
+    ~ -swap variants |     m -wide display       |
 "
   "Help message usually used for 2-way comparison.
 Normally, not a user option.  See `ediff-help-message' for details.")
-  
+
 (defconst ediff-long-help-message-narrow2
   "
 p,DEL -previous diff |     | -vert/horiz split   |a/b -copy A/B's region to B/A
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
-    j -jump to diff  |     @ -auto-refinement    |  * -refine current region   
-   gx -goto X's point|     % -narrow/widen buffs |  ! -update diff regions     
+    j -jump to diff  |     @ -auto-refinement    |  * -refine current region
+   gx -goto X's point|     % -narrow/widen buffs |  ! -update diff regions
   C-l -recenter      |    ## -ignore whitespace  |
-  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X              
-  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output        
-    ~ -swap variants |     m -wide display       |  
+  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
+  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
+    ~ -swap variants |     m -wide display       |
 "
   "Help message when comparing windows or regions line-by-line.
 Normally, not a user option.  See `ediff-help-message' for details.")
-  
+
 (defconst ediff-long-help-message-word-mode
   "
 p,DEL -previous diff |     | -vert/horiz split   | xy -copy buf X's region to Y
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
-    j -jump to diff  |                           |                   
-   gx -goto X's point|     % -narrow/widen buffs |  ! -recompute diffs         
+    j -jump to diff  |                           |
+   gx -goto X's point|     % -narrow/widen buffs |  ! -recompute diffs
   C-l -recenter      |                           |
-  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X              
-  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output        
-    ~ -swap variants |     m -wide display       |  
+  v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
+  </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
+    ~ -swap variants |     m -wide display       |
 "
   "Help message when comparing windows or regions word-by-word.
 Normally, not a user option.  See `ediff-help-message' for details.")
-  
+
 (defconst ediff-long-help-message-merge
   "
 p,DEL -previous diff |     | -vert/horiz split   |  x -copy buf X's region to C
 n,SPC -next diff     |     h -hilighting         |  r -restore buf C's old diff
-    j -jump to diff  |     @ -auto-refinement    |  * -refine current region   
-   gx -goto X's point|    ## -ignore whitespace  |  ! -update diff regions     
-  C-l -recenter      | #f/#h -focus/hide regions |  + -combine diff regions    
-  v/V -scroll up/dn  |     X -read-only in buf X | wx -save buf X              
-  </> -scroll lt/rt  |     m -wide display       | wd -save diff output        
-    ~ -swap variants |     s -shrink window C    |  / -show ancestor buff      
-                     |  $$ -show clashes only    |  & -merge w/new default     
+    j -jump to diff  |     @ -auto-refinement    |  * -refine current region
+   gx -goto X's point|    ## -ignore whitespace  |  ! -update diff regions
+  C-l -recenter      | #f/#h -focus/hide regions |  + -combine diff regions
+  v/V -scroll up/dn  |     X -read-only in buf X | wx -save buf X
+  </> -scroll lt/rt  |     m -wide display       | wd -save diff output
+    ~ -swap variants |     s -shrink window C    |  / -show ancestor buff
+                     |  $$ -show clashes only    |  & -merge w/new default
                      |  $* -skip changed regions |
 "
   "Help message for merge sessions.
 ;; The actual long help message.
 (ediff-defvar-local ediff-long-help-message ""
   "Normally, not a user option.  See `ediff-help-message' for details.")
-  
+
 (defconst ediff-brief-message-string
   " ? -quick help "
   "Contents of the brief help message.")
 ;; The actual brief help message
 (ediff-defvar-local ediff-brief-help-message ""
   "Normally, not a user option.  See `ediff-help-message' for details.")
-  
+
 (ediff-defvar-local ediff-brief-help-message-function nil
   "The brief help message that the user can customize.
 If the user sets this to a parameter-less function, Ediff will use it to
 Normally, the user shouldn't touch this.  However, if you want Ediff to
 start up with different help messages for different jobs, you can change
 the value of this variable and the variables `ediff-help-message-*' in
-`ediff-startup-hook'.") 
+`ediff-startup-hook'.")
 
 
 ;; the keymap that defines clicks over the quick help regions
 			      (overlay-get elt 'ediff-help-info))
 			    (overlays-at pos))))
      )
-    
+
     (if (not (stringp cmd))
 	(error "Hmm...  I don't see an Ediff command around here..."))
-    
+
     (ediff-documentation "Quick Help Commands")
-    
+
     (let (case-fold-search)
       (cond ((string= cmd "?") (re-search-forward "^`\\?'"))
 	    ((string= cmd "G") (re-search-forward "^`G'"))
 	(next-line 1))
     (end-of-line)
     (current-column)))
-    
+
 
 (defun ediff-indent-help-message ()
   (let* ((shift (/ (max 0 (- (window-width (selected-window))
 	(insert str)
 	(beginning-of-line)
 	(forward-line 1)))))
-      
+
 
 ;; compose the help message as a string
 (defun ediff-set-help-message ()
 		    (or (symbolp ediff-long-help-message-function)
 			(consp ediff-long-help-message-function)))
 	       (funcall ediff-long-help-message-function))
-	      (ediff-word-mode 
+	      (ediff-word-mode
 	       (concat ediff-long-help-message-head
 		       ediff-long-help-message-word-mode
 		       ediff-long-help-message-tail))
 	       (concat ediff-long-help-message-head
 		       ediff-long-help-message-narrow2
 		       ediff-long-help-message-tail))
-	      (ediff-merge-job 
+	      (ediff-merge-job
 	       (concat ediff-long-help-message-head
 		       ediff-long-help-message-merge
 		       ediff-long-help-message-tail))
 	       (concat ediff-long-help-message-head
 		       ediff-long-help-message-compare3
 		       ediff-long-help-message-tail))
-	      (t 
+	      (t
 	       (concat ediff-long-help-message-head
 		       ediff-long-help-message-compare2
 		       ediff-long-help-message-tail))))
-  (setq ediff-brief-help-message 
+  (setq ediff-brief-help-message
 	(cond ((and ediff-brief-help-message-function
 		    (or (symbolp ediff-brief-help-message-function)
 			(consp ediff-brief-help-message-function)))
 (defmacro ediff-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form)
   (if (string-match "XEmacs" emacs-version)
       xemacs-form emacs-form))
- 
+
 ;; This autoload is useless in Emacs because ediff-hook.el is dumped with
 ;; emacs, but it is needed in XEmacs
 ;;;###autoload
 	:selected (if (featurep 'ediff-tbar)
 		      (ediff-use-toolbar-p))]
        ))
-   
+
    ;; put these menus before Object-Oriented-Browser in Tools menu
    (if (and (featurep 'menubar) (not (featurep 'infodock))
 	    (not (featurep 'ediff-hook)))
 	   (ediff-xemacs-init-menus)))
- 
+
  ;; Emacs--only if menu-bar is loaded
  (if (featurep 'menu-bar)
      (progn
        (defvar menu-bar-epatch-menu (make-sparse-keymap "Apply Patch"))
        (fset 'menu-bar-epatch-menu (symbol-value 'menu-bar-epatch-menu))
        (defvar menu-bar-ediff-merge-menu (make-sparse-keymap "Merge"))
-       (fset 'menu-bar-ediff-merge-menu 
+       (fset 'menu-bar-ediff-merge-menu
 	     (symbol-value 'menu-bar-ediff-merge-menu))
        (defvar menu-bar-ediff-menu (make-sparse-keymap "Compare"))
        (fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu))
 	   . ediff-merge-directories-with-ancestor))
        (define-key menu-bar-ediff-merge-menu [ediff-merge-directories]
 	 '("Directories..." . ediff-merge-directories))
-       (define-key 
+       (define-key
 	 menu-bar-ediff-merge-menu [separator-ediff-merge-dirs] '("--"))
        (define-key
 	 menu-bar-ediff-merge-menu [ediff-merge-buffers-with-ancestor]
        (define-key menu-bar-ediff-misc-menu [ediff-doc]
 	 '("Ediff Manual..." . ediff-documentation))
        )
-      
+
       ) ; emacs case
  ) ; ediff-cond-compile-for-xemacs-or-emacs
 
   (autoload 'ediff-revision "ediff" "Compare versions of a file" t)
 
   ;; compare regions and windows
-  (autoload 'ediff-windows-wordwise 
+  (autoload 'ediff-windows-wordwise
     "ediff" "Compare two windows word-by-word." t)
-  (autoload 'ediff-regions-wordwise 
+  (autoload 'ediff-regions-wordwise
     "ediff" "Compare two regions word-by-word." t)
-  (autoload 'ediff-windows-linewise 
+  (autoload 'ediff-windows-linewise
     "ediff" "Compare two windows line-by-line." t)
-  (autoload 'ediff-regions-linewise 
+  (autoload 'ediff-regions-linewise
     "ediff" "Compare two regions line-by-line." t)
 
   ;; patch
   (autoload
     'ediff-directories3 "ediff" "Compare files in three directories." t)
 
-  (autoload 'edir-revisions 
+  (autoload 'edir-revisions
     "ediff" "Compare two versions of a file." t)
-  (autoload 'ediff-directory-revisions 
+  (autoload 'ediff-directory-revisions
     "ediff" "Compare two versions of a file." t)
 
   ;; merge directories
     "Merge files in two directories using files in a third dir as ancestors."
     t)
 
-  (autoload 'edir-merge-revisions 
+  (autoload 'edir-merge-revisions
     "ediff" "Merge versions of files in a directory." t)
-  (autoload 'ediff-merge-directory-revisions 
+  (autoload 'ediff-merge-directory-revisions
     "ediff" "Merge versions of files in a directory." t)
   (autoload 'ediff-merge-directory-revisions-with-ancestor
     "ediff"
     "ediff-util"
     "Toggle the use of Ediff toolbar."
     t)
-  
+
   ) ; if purify-flag
 
 
   :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. 
+  "*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,
 ;; A var local to each control panel buffer.  Indicates highlighting style
 ;; in effect for this buffer: `face', `ascii',
 ;; `off' -- turned off \(on a dumb terminal only\).
-(ediff-defvar-local ediff-highlighting-style 
+(ediff-defvar-local ediff-highlighting-style
   (if (and (ediff-has-face-support-p) ediff-use-faces) 'face 'ascii)
   "")
 
 	    (t nil))))
 
 (defsubst ediff-frame-char-height (frame)
-  (ediff-cond-compile-for-xemacs-or-emacs 
+  (ediff-cond-compile-for-xemacs-or-emacs
    (glyph-height ediff-H-glyph (frame-selected-window frame)) ; xemacs case
    (frame-char-height frame) ; emacs case
    )
   :type '(radio (const default-A) (const default-B) (const combined))
   :group 'ediff-merge)
 
-(defcustom ediff-combination-pattern 
+(defcustom ediff-combination-pattern
   '("<<<<<<< variant A" A ">>>>>>> variant B" B  "####### Ancestor" Ancestor "======= end")
   "*Pattern to be used for combining difference regions in buffers A and B.
-The value must be a list of the form 
+The value must be a list of the form
 (STRING1 bufspec1  STRING2 bufspec2 STRING3 bufspec3 STRING4)
 where bufspec is the symbol A, B, or Ancestor. For instance, if the value is
 '(STRING1 A  STRING2 Ancestor STRING3 B STRING4) then the
 A region is considered to have been changed if it is different from the current
 default (`default-A', `default-B', `combined') and it hasn't been marked as
 `prefer-A' or `prefer-B'.
-A region is considered to have been changed also when it is marked as 
+A region is considered to have been changed also when it is marked as
 as `prefer-A', but is different from the corresponding difference region in
 Buffer A or if it is marked as `prefer-B' and is different from the region in
 Buffer B."
 ;; If ediff-skip-changed-regions, check if the merge region differs from
 ;; the current default. If a region is different from the default, it means
 ;; that the user has made determination as to how to merge for this particular
-;; region. 
+;; region.
 (defsubst ediff-skip-merge-region-if-changed-from-default-p (n)
   (and ediff-skip-merge-regions-that-differ-from-default
        (ediff-merge-changed-from-default-p n 'prefers-too)))
 	  (setq combo-region
 		(concat combo-region
 			region-delim "\n"
-			(ediff-get-region-contents 
+			(ediff-get-region-contents
 			 n region-spec ediff-control-buffer)))
 	(error ""))
       (setq pattern-list (cdr (cdr pattern-list)))
     (while (< n ediff-number-of-differences)
       (ediff-set-state-of-diff-in-all-buffers n ctl-buf)
       (setq n (1+ n)))))
-     
+
 (defun ediff-set-state-of-diff-in-all-buffers (n ctl-buf)
   (let ((regA (ediff-get-region-contents n 'A ctl-buf))
 	(regB (ediff-get-region-contents n 'B ctl-buf))
 	     (ediff-set-state-of-diff n 'B nil)
 	     (ediff-set-state-of-diff n 'C nil)))
     ))
-    
+
 (defun ediff-set-merge-mode ()
   (normal-mode t)
   (remove-hook 'local-write-file-hooks 'ediff-set-merge-mode))
 
-	
+
 ;; Go over all diffs starting with DIFF-NUM and copy regions into buffer C
 ;; according to the state of the difference.
 ;; Since ediff-copy-diff refuses to copy identical diff regions, there is
 		   (if remerging "Re-merging" "Merging")
 		   n
 		   ediff-number-of-differences))
-	     
+
       (setq state-of-merge (ediff-get-state-of-merge n))
 
       (if remerging
 	  ;;	(reg-B (ediff-get-region-contents n 'B ediff-control-buffer))
 	  ;;	(reg-C (ediff-get-region-contents n 'C ediff-control-buffer)))
 	  (let ()
-		
+
 	    ;; if region was edited since it was first set by default
 	    (if (or (ediff-merge-changed-from-default-p n)
 		    ;; was preferred
 		    (string-match "prefer" state-of-merge))
 		;; then ignore
 		(setq do-not-copy t))
-		
+
 	    ;; change state of merge for this diff, if necessary
 	    (if (and (string-match "\\(default\\|combined\\)" state-of-merge)
 		     (not do-not-copy))
 		(ediff-set-state-of-merge
 		 n (format "%S" ediff-default-variant)))
 	    ))
-	  
+
       ;; state-of-merge may have changed via ediff-set-state-of-merge, so
       ;; check it once again
       (setq state-of-merge (ediff-get-state-of-merge n))
-      
+
       (or do-not-copy
 	  (if (string= state-of-merge "combined")
 	      ;; use n+1 because ediff-combine-diffs works via user numbering
 	      ;; of diffs, which is 1+ to what ediff uses internally
 	      (ediff-combine-diffs (1+ n) 'batch)
-	    (ediff-copy-diff 
+	    (ediff-copy-diff
 	     n (if (string-match "-A" state-of-merge) 'A 'B) 'C 'batch)))
       (setq n (1+ n)))
     (message "Merging buffers A & B into C ... Done")
     ))
-    
+
 
 (defun ediff-re-merge ()
   "Remerge unmodified diff regions using a new default.  Start with the current region."
 		  default-variant-alist)))
     (setq ediff-default-variant
 	  (intern
-	   (completing-read 
+	   (completing-read
 	    (format "Current merge default is `%S'.  New default: "
 		    ediff-default-variant)
 	    actual-alist nil 'must-match)))
     (ediff-do-merge ediff-current-difference 'remerge)
     (ediff-recenter)
   ))
-    
+
 (defun ediff-shrink-window-C (arg)
   "Shrink window C to just one line.
 With a prefix argument, returns window C to its normal size.
 `ediff-combination-pattern'."
   (interactive "P")
   (setq n (if (numberp n) (1- n) ediff-current-difference))
-  
+
   (let (reg-combined)
     ;;(setq regA (ediff-get-region-contents n 'A ediff-control-buffer)
     ;;	  regB (ediff-get-region-contents n 'B ediff-control-buffer))
     ;;(setq reg-combined (ediff-make-combined-diff regA regB))
     (setq reg-combined (ediff-get-combined-region n))
-    
+
     (ediff-copy-diff n nil 'C batch-invocation reg-combined))
     (or batch-invocation (ediff-jump-to-difference (1+ n))))
-    
+
 
 ;; Checks if the region in buff C looks like a combination of the regions
 ;; in buffers A and B.  Return a list (reg-a-beg reg-a-end reg-b-beg reg-b-end)
 	    (mrgreg-end (ediff-get-diff-posn 'C 'end region-num))
 	    (pattern-list ediff-combination-pattern)
 	    delim reg-beg reg-end delim-regs-list)
-	
+
 	(if combined
 	    (ediff-with-current-buffer ediff-buffer-C
 	      (while pattern-list
 	(reg-C (ediff-get-region-contents diff-num 'C ediff-control-buffer)))
 
     (setq state-of-merge (ediff-get-state-of-merge diff-num))
-		
+
     ;; if region was edited since it was first set by default
     (or (and (string= state-of-merge "default-A")
 	     (not (string= reg-A reg-C)))
 	     (string= state-of-merge "prefer-B")
 	     (not (string= reg-B reg-C)))
 	)))
-  
+
 
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
 ;; buffer used to collect custom diffs from individual sessions in the group
 (ediff-defvar-local ediff-meta-diff-buffer nil "")
 
-;; history var to use for filtering groups
+;; history var to use for filtering groups of files
 (defvar ediff-filtering-regexp-history nil "")
 
+(defcustom ediff-default-filtering-regexp nil
+  "The default regular expression used as a filename filter in multifile comparisons.
+Should be a sexp. For instance (car ediff-filtering-regexp-history) or nil."
+  :type 'sexp
+  :group 'ediff-mult)
+
 ;; This has the form ((meta-buf regexp dir1 dir2 dir3 merge-auto-store-dir)
 ;; (ctl-buf session-status (file1 . eq-status) (file2 . eq-status) (file3
 ;; . eq-status)) (ctl-buf session-status (file1 . eq-status) (file2
 ;;; Commentary:
 
 ;;; Code:
-	 
+
 (provide 'ediff-ptch)
 
 (defgroup ediff-ptch nil
 (defconst ediff-default-backup-extension
   (if (memq system-type '(vax-vms axp-vms emx ms-dos))
       "_orig" ".orig"))
-  
+
 
 (defcustom ediff-backup-extension ediff-default-backup-extension
   "Backup extension used by the patch program.
 	    (t 'traditional))
     (file-error nil)))
 
-(defcustom ediff-backup-specs 
+(defcustom ediff-backup-specs
   (let ((type (ediff-test-patch-utility)))
     (cond ((eq type 'gnu)
 	   ;; GNU `patch' v. >= 2.2
 	    (setq count (1+ count)))))
       count)))
 
-;; Scan BUF (which is supposed to contain a patch) and make a list of the form 
+;; Scan BUF (which is supposed to contain a patch) and make a list of the form
 ;;    ((nil nil filename-spec1 marker1 marker2)
 ;;          (nil nil filename-spec2 marker1 marker2) ...)
-;; where filename-spec[12] are files to which the `patch' program would 
+;; where filename-spec[12] are files to which the `patch' program would
 ;; have applied the patch.
 ;; nin, nil are placeholders. See ediff-make-new-meta-list-element in
 ;;    ediff-meta.el for the explanations.
 		(move-marker mark2 (match-beginning 0)))
 
 	    (goto-char mark2-end)
-	    
+
 	    (if filenames
 		(setq patch-map
 		      (cons (ediff-make-new-meta-list-element
 			;; directory part of filename
 			(file-name-as-directory filename)
 		      (file-name-directory filename)))
-	;; Filename-spec is objA; at this point it is represented as 
+	;; Filename-spec is objA; at this point it is represented as
 	;; (file1 . file2). We get it using ediff-get-session-objA
 	;; directory part of the first file in the patch
 	(base-dir1 (file-name-directory
 			(setcar (ediff-get-session-objA session-info)
 				(cons user-file user-file))))
 		  (setcar proposed-file-names
-			  (expand-file-name 
+			  (expand-file-name
 			   (concat actual-dir (car proposed-file-names))))
 		  (setcdr proposed-file-names
-			  (expand-file-name 
+			  (expand-file-name
 			   (concat actual-dir (cdr proposed-file-names)))))
 		))
 	    ediff-patch-map)
 		  (let ((directory t)
 			target)
 		    (while directory
-		      (setq target (read-file-name 
+		      (setq target (read-file-name
 				    "Please enter a patch target: "
 				    actual-dir actual-dir t))
 		      (if (not (file-directory-p target))
 		   (if (y-or-n-p "Is the patch already in a buffer? ")
 		       (ediff-prompt-for-patch-buffer)
 		     (ediff-prompt-for-patch-file)))))
-    
+
     (ediff-with-current-buffer patch-buf
       (goto-char (point-min))
       (or (ediff-get-visible-buffer-window patch-buf)
 			"^/dev/null"
 			;; this is the file to patch
 			(ediff-get-session-objA-name (car ediff-patch-map))))
-		  (> (length 
+		  (> (length
 		      (ediff-get-session-objA-name (car ediff-patch-map)))
 		     1))
 	     (ediff-get-session-objA-name (car ediff-patch-map))
       (set-visited-file-modtime) ; sync buffer and temp file
       (setq default-directory default-dir)
       )
-  
+
     ;; dispatch a patch function
     (setq ctl-buf (ediff-dispatch-file-patching-job
 		   patch-buf file-name startup-hooks))
-    
+
     (ediff-with-current-buffer ctl-buf
       (delete-file (buffer-file-name ediff-buffer-A))
       (delete-file (buffer-file-name ediff-buffer-B))
 	(setq buffer-auto-save-file-name nil) ; don't create auto-save file
 	(if default-dir (setq default-directory default-dir))
 	(set-visited-file-name nil)
-	(rename-buffer (ediff-unique-buffer-name 
+	(rename-buffer (ediff-unique-buffer-name
 			(concat buf-to-patch-name "_patched") ""))
 	(set-buffer-modified-p t)))
     ))
 (defun ediff-patch-file-internal (patch-buf source-filename
 					    &optional startup-hooks)
   (setq source-filename (expand-file-name source-filename))
-  
+
   (let* ((shell-file-name ediff-shell)
 	 (patch-diagnostics (get-buffer-create "*ediff patch diagnostics*"))
 	 ;; ediff-find-file may use a temp file to do the patch
 	 (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 
+	 (coding-system-for-write
 	  (if (boundp 'buffer-file-coding-system) buffer-file-coding-system))
-	 target-buf buf-to-patch file-name-magic-p 
+	 target-buf buf-to-patch file-name-magic-p
 	 patch-return-code ctl-buf backup-style aux-wind)
-	  
+
     (if (string-match "V" ediff-patch-options)
 	(error
 	 "Ediff doesn't take the -V option in `ediff-patch-options'--sorry"))
-					
+
     ;; Make a temp file, if source-filename has a magic file handler (or if
     ;; it is handled via auto-mode-alist and similar magic).
     ;; Check if there is a buffer visiting source-filename and if they are in
     ;; temporary file where we put the after-product of the file handler.
     (setq file-name-magic-p (not (equal (file-truename true-source-filename)
 					(file-truename source-filename))))
-    
-    ;; Checkout orig file, if necessary, so that the patched file 
+
+    ;; Checkout orig file, if necessary, so that the patched file
     ;; could be checked back in.
     (ediff-maybe-checkout buf-to-patch)
 
 
     (switch-to-buffer patch-diagnostics)
     (sit-for 0) ; synchronize - let the user see diagnostics
-    
+
     (or (and (ediff-patch-return-code-ok patch-return-code)
 	     (file-exists-p
 	      (concat true-source-filename ediff-backup-extension)))
 	  (with-output-to-temp-buffer ediff-msg-buffer
 	    (ediff-with-current-buffer standard-output
 	      (fundamental-mode))
-	    (princ (format 
+	    (princ (format
 		    "Patch program has failed due to a bad patch file,
 it couldn't apply all hunks, OR
 it couldn't create the backup for the file being patched.
     ediff-backup-extension = %S             ediff-backup-specs     = %S
 
 See Ediff on-line manual for more details on these variables.
-In particular, check the documentation for `ediff-backup-specs'. 
+In particular, check the documentation for `ediff-backup-specs'.
 
 In any of the above cases, Ediff doesn't compare files automatically.
 However, if the patch was applied partially and the backup file was created,
 		(goto-char (point-max))))
 	  (switch-to-buffer-other-window patch-diagnostics)
 	  (error "Patch appears to have failed")))
-    
+
     ;; If black magic is involved, apply patch to a temp copy of the
     ;; file.  Otherwise, apply patch to the orig copy.  If patch is applied
     ;; to temp copy, we name the result old-name_patched for local files
 	  (set-visited-file-name
 	   (concat source-filename ediff-backup-extension))
 	  (set-buffer-modified-p nil))
-      
+
       ;; Black magic in effect.
       ;; If orig file was remote, put the patched file in the temp directory.
       ;; If orig file is local, put the patched file in the directory of
 		 true-source-filename
 	       source-filename)
 	     "_patched"))
-      
+
       (rename-file true-source-filename target-filename t)
-      
+
       ;; arrange that the temp copy of orig will be deleted
       (rename-file (concat true-source-filename ediff-backup-extension)
 		   true-source-filename t))
-    
+
     ;; make orig buffer read-only
     (setq startup-hooks
 	  (cons 'ediff-set-read-only-in-buf-A startup-hooks))
-    
+
     ;; set up a buf for the patched file
     (setq target-buf (find-file-noselect target-filename))
-    
+
     (setq ctl-buf
 	  (ediff-buffers-internal
 	   buf-to-patch target-buf nil
     (ediff-with-current-buffer ctl-buf
       (setq ediff-patchbufer patch-buf
 	    ediff-patch-diagnostics patch-diagnostics))
-  
+
     (bury-buffer patch-diagnostics)
     (message "Type `P', if you need to see patch diagnostics")
     ctl-buf))
 			 'ediff-patch-file-form-meta
 			 ediff-meta-patchbufer patch-buf) )
 		startup-hooks))
-    (setq meta-buf (ediff-prepare-meta-buffer 
+    (setq meta-buf (ediff-prepare-meta-buffer
 		    'ediff-filegroup-action
 		    (ediff-with-current-buffer patch-buf
 		      (cons (ediff-make-new-meta-list-header
     (ediff-show-meta-buffer meta-buf)
     ))
 
-  
-      
+
+
 
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
 ;;; Commentary:
 
 ;;; Code:
-	 
+
 (provide 'ediff-util)
 
 ;; Compiler pacifier
   (setq mode-name "Ediff")
   (run-hooks 'ediff-mode-hook))
 
-    
+
 
 ;;; Build keymaps
 
   (if (null ediff-mode-map)
       (ediff-setup-keymap))
   (use-local-map ediff-mode-map))
-  
+
 ;; Reload Ediff keymap.  For debugging only.
 (defun ediff-reload-keymap ()
   (interactive)
   (setq ediff-mode-map nil)
   (ediff-set-keys))
-  
+
 
 (defun ediff-setup-keymap ()
   "Set up the keymap used in the control buffer of Ediff."
   (setq ediff-mode-map (make-sparse-keymap))
   (suppress-keymap ediff-mode-map)
-  
+
   (define-key ediff-mode-map
     (if ediff-emacs-p [mouse-2] [button2]) 'ediff-help-for-quick-help)
   (define-key ediff-mode-map "\C-m"  'ediff-help-for-quick-help)
 	))
 
   (define-key ediff-mode-map "m" 'ediff-toggle-wide-display)
-	
+
   ;; Allow ediff-mode-map to be referenced indirectly
   (fset 'ediff-mode-map ediff-mode-map)
   (run-hooks 'ediff-keymap-setup-hook))
 	    (ediff-convert-standard-filename (expand-file-name file-C))))
   (if (stringp merge-buffer-file)
       (progn
-	(setq merge-buffer-file 
+	(setq merge-buffer-file
 	      (ediff-convert-standard-filename
 	       (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"
-		   (abbreviate-file-name 
+		   (abbreviate-file-name
 		    (file-name-directory merge-buffer-file))))
 	(if (and (file-exists-p merge-buffer-file)
 		 (file-directory-p merge-buffer-file))
 	    (error "The merge buffer file %s must not be a directory"
 		   (abbreviate-file-name merge-buffer-file)))
 	))
-  (let* ((control-buffer-name 
+  (let* ((control-buffer-name
 	  (ediff-unique-buffer-name "*Ediff Control Panel" "*"))
 	 (control-buffer (ediff-with-current-buffer buffer-A
 			   (get-buffer-create control-buffer-name))))
     (ediff-with-current-buffer control-buffer
-      (ediff-mode)                 
-	
+      (ediff-mode)
+
       (make-local-variable 'ediff-use-long-help-message)
       (make-local-variable 'ediff-prefer-iconified-control-frame)
       (make-local-variable 'ediff-split-window-function)
       (while setup-parameters
 	(set (car (car setup-parameters)) (cdr (car setup-parameters)))
 	(setq setup-parameters (cdr setup-parameters)))
-	
+
       ;; set variables classifying the current ediff job
       ;; must come AFTER setup-parameters
       (setq ediff-3way-comparison-job (ediff-3way-comparison-job)
       (if (ediff-window-display-p)
 	  (add-hook 'pre-command-hook 'ediff-spy-after-mouse nil 'local))
       (setq ediff-mouse-pixel-position (mouse-pixel-position))
-      
+
       ;; adjust for merge jobs
       (if ediff-merge-job
 	  (let ((buf
 		 (cond ((eq ediff-default-variant 'default-B)
 			buffer-B)
 		       (t buffer-A))))
-		 
+
 	    (setq ediff-split-window-function
-		  ediff-merge-split-window-function) 
-	    
+		  ediff-merge-split-window-function)
+
 	    ;; remember the ancestor buffer, if any
 	    (setq ediff-ancestor-buffer buffer-C)
-	    
+
 	    (setq buffer-C
 		  (get-buffer-create
 		   (ediff-unique-buffer-name "*ediff-merge" "*")))
 	      (widen) ; merge buffer is always widened
 	      (add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t)
 	      )))
-      (setq buffer-read-only nil    
+      (setq buffer-read-only nil
 	    ediff-buffer-A buffer-A
 	    ediff-buffer-B buffer-B
 	    ediff-buffer-C buffer-C
 	    ediff-control-buffer control-buffer)
 
       (ediff-choose-syntax-table)
-	   
+
       (setq ediff-control-buffer-suffix
 	    (if (string-match "<[0-9]*>" control-buffer-name)
 		(substring control-buffer-name
 		(or
 		 (string-match "[0-9]+" ediff-control-buffer-suffix)
 		 0))))))
-	   
+
       (setq ediff-error-buffer
 	    (get-buffer-create (ediff-unique-buffer-name "*ediff-errors" "*")))
-      
+
       (ediff-with-current-buffer buffer-A (ediff-strip-mode-line-format))
       (ediff-with-current-buffer buffer-B (ediff-strip-mode-line-format))
       (if ediff-3way-job
       (if (ediff-buffer-live-p ediff-ancestor-buffer)
 	  (ediff-with-current-buffer ediff-ancestor-buffer
 	    (ediff-strip-mode-line-format)))
-      
+
       (ediff-save-protected-variables) ; save variables to be restored on exit
-      
+
       ;; ediff-setup-diff-regions-function must be set after setup
       ;; parameters are processed.
       (setq ediff-setup-diff-regions-function
 	    (if ediff-diff3-job
 		'ediff-setup-diff-regions3
 	      'ediff-setup-diff-regions))
-	
+
       (setq ediff-wide-bounds
 	    (list (ediff-make-bullet-proof-overlay
 		   '(point-min) '(point-max) ediff-buffer-A)
 		   '(point-min) '(point-max) ediff-buffer-B)
 		  (ediff-make-bullet-proof-overlay
 		   '(point-min) '(point-max) ediff-buffer-C)))
-      
+
       ;; This has effect only on ediff-windows/regions
       ;; In all other cases, ediff-visible-region sets visibility bounds to
       ;; ediff-wide-bounds, and ediff-narrow-bounds are ignored.
       (if ediff-start-narrowed
 	  (setq ediff-visible-bounds ediff-narrow-bounds)
 	(setq ediff-visible-bounds ediff-wide-bounds))
-      
+
       (ediff-set-keys) ; comes after parameter setup
-      
+
       ;; set up ediff-narrow-bounds, if not set
       (or ediff-narrow-bounds
 	  (setq ediff-narrow-bounds ediff-wide-bounds))
-      
+
       ;; All these must be inside ediff-with-current-buffer control-buffer,
       ;; since these vars are local to control-buffer
       ;; These won't run if there are errors in diff
 	    (or (memq control-buffer ediff-this-buffer-ediff-sessions)
 		(setq ediff-this-buffer-ediff-sessions
 		      (cons control-buffer
-			    ediff-this-buffer-ediff-sessions))) 
+			    ediff-this-buffer-ediff-sessions)))
 	    (if ediff-make-buffers-readonly-at-startup
 		(setq buffer-read-only t)
 	      (setq buffer-read-only nil))
 		      (cons control-buffer
 			    ediff-this-buffer-ediff-sessions)))
 	    ))
-      
+
       ;; the following must be after setting up  ediff-narrow-bounds AND after
       ;; nuking selective display
       (funcall ediff-setup-diff-regions-function file-A file-B file-C)
       (setq ediff-number-of-differences (length ediff-difference-vector-A))
       (setq ediff-current-difference -1)
-      
+
       (ediff-make-current-diff-overlay 'A)
       (ediff-make-current-diff-overlay 'B)
       (if ediff-3way-job
 	  (ediff-make-current-diff-overlay 'C))
       (if ediff-merge-with-ancestor-job
 	  (ediff-make-current-diff-overlay 'Ancestor))
-	  
+
       (ediff-setup-windows buffer-A buffer-B buffer-C control-buffer)
-      
+
       (let ((shift-A (ediff-overlay-start
 		      (ediff-get-value-according-to-buffer-type
 		       'A ediff-narrow-bounds)))
 	      (select-window ediff-window-C)
 	      (goto-char shift-C)))
 	)
-      
+
       (select-window ediff-control-window)
       (ediff-visible-region)
-      
+
       (run-hooks 'startup-hooks)
       (ediff-arrange-autosave-in-merge-jobs merge-buffer-file)
 
       (run-hooks 'ediff-startup-hook)
       ) ; eval in control-buffer
     control-buffer))
-      
-      
+
+
 ;; This function assumes that we are in the window where control buffer is
-;; to reside. 
+;; to reside.
 (defun ediff-setup-control-buffer (ctl-buf)
   "Set up window for control buffer."
   (if (window-dedicated-p (selected-window))
 	(ediff-make-bottom-toolbar)) ; this checks if toolbar is requested
     (goto-char (point-min))
     (skip-chars-forward ediff-whitespace)))
-    
+
 ;; This executes in control buffer and sets auto-save, visited file name, etc,
 ;; in the merge buffer
 (defun ediff-arrange-autosave-in-merge-jobs (merge-buffer-file)
 	(progn
 	  ;; save before leaving ctl buffer
 	  (ediff-verify-file-merge-buffer ediff-merge-store-file)
-	  (setq merge-buffer-file ediff-merge-store-file) 
+	  (setq merge-buffer-file ediff-merge-store-file)
 	  (ediff-with-current-buffer ediff-buffer-C
 	    (set-visited-file-name merge-buffer-file))))
     (ediff-with-current-buffer ediff-buffer-C
 
 
 ;;; Commands for working with Ediff
-     
+
 (defun ediff-update-diffs ()
   "Recompute difference regions in buffers A, B, and C.
 Buffers are not synchronized with their respective files, so changes done
 	    (y-or-n-p
 	     "Ancestor buffer will not be used.  Recompute diffs anyway? ")))
       (error "Recomputation of differences canceled"))
-      
+
   (let ((point-A (ediff-with-current-buffer ediff-buffer-A (point)))
 	;;(point-B (ediff-with-current-buffer ediff-buffer-B (point)))
 	(tmp-buffer (get-buffer-create ediff-tmp-buffer))
 	(setq buf-C-file-name (file-name-nondirectory buf-C-file-name)))
 
     (ediff-unselect-and-select-difference -1)
-    
+
     (setq beg-A (ediff-overlay-start overl-A)
 	  beg-B (ediff-overlay-start overl-B)
 	  beg-C (ediff-overlay-start overl-C)
 	  end-A (ediff-overlay-end overl-A)
 	  end-B (ediff-overlay-end overl-B)
 	  end-C (ediff-overlay-end overl-C))
-	  
+
     (if ediff-word-mode
 	(progn
 	  (ediff-wordify beg-A end-A ediff-buffer-A tmp-buffer)
       (if ediff-3way-job
 	  (setq file-C (ediff-make-temp-file ediff-buffer-C buf-C-file-name)))
       )
-	
+
     (ediff-clear-diff-vector 'ediff-difference-vector-A 'fine-diffs-also)
     (ediff-clear-diff-vector 'ediff-difference-vector-B 'fine-diffs-also)
     (ediff-clear-diff-vector 'ediff-difference-vector-C 'fine-diffs-also)
 	  ediff-state-of-merge nil)
 
     (setq ediff-killed-diffs-alist nil) ; invalidate saved killed diff regions
-    
+
     ;; In case of merge job, fool it into thinking that it is just doing
     ;; comparison
     (let ((ediff-setup-diff-regions-function ediff-setup-diff-regions-function)
 		ediff-merge-with-ancestor-job nil
 		ediff-job-name 'ediff-files3))
       (funcall ediff-setup-diff-regions-function file-A file-B file-C))
-	    
+
     (setq ediff-number-of-differences (length ediff-difference-vector-A))
     (delete-file file-A)
     (delete-file file-B)
     (if file-C
 	(delete-file file-C))
-	
+
     (if ediff-3way-job
 	(ediff-set-state-of-all-diffs-in-all-buffers ediff-control-buffer))
-	
+
     (ediff-jump-to-difference (ediff-diff-at-point 'A point-A))
     (message "")
     ))
-    
+
 ;; Not bound to any key---to dangerous.  A user can do it if necessary.
 (defun ediff-revert-buffers-then-recompute-diffs (noconfirm)
   "Revert buffers A, B and C.  Then rerun Ediff on file A and file B."
       (ediff-update-diffs))))
 
 
-;; optional NO-REHIGHLIGHT says to not rehighlight buffers 
+;; optional NO-REHIGHLIGHT says to not rehighlight buffers
 (defun ediff-recenter (&optional no-rehighlight)
   "Bring the highlighted region of all buffers being compared into view.
 Reestablish the default three-window display."
 	  (message ediff-KILLED-VITAL-BUFFER
 		   (beep 1)))
       ))
-  
+
   ;; set visibility range appropriate to this invocation of Ediff.
   (ediff-visible-region)
   ;; raise
 	   (not ediff-use-long-help-message)
 	   (not (ediff-frame-iconified-p ediff-control-frame)))
       (raise-frame ediff-control-frame))
-  
+
   ;; Redisplay whatever buffers are showing, if there is a selected difference
   (let ((control-frame ediff-control-frame)
 	(control-buf ediff-control-buffer))
 	(progn
 	  (or no-rehighlight
 	      (ediff-select-difference ediff-current-difference))
-	  
+
 	  (ediff-recenter-one-window 'A)
 	  (ediff-recenter-one-window 'B)
 	  (if ediff-3way-job
 	      (ediff-recenter-one-window 'C))
-	  
+
 	  (ediff-with-current-buffer control-buf
 	    (ediff-recenter-ancestor) ; check if ancestor is alive
-	    
+
 	    (if (and (ediff-multiframe-setup-p)
 		     (not ediff-use-long-help-message)
 		     (not (ediff-frame-iconified-p ediff-control-frame)))
     (ediff-restore-highlighting)
     (ediff-with-current-buffer control-buf (ediff-refresh-mode-lines))
     ))
-  
+
 ;; this function returns to the window it was called from
 ;; (which was the control window)
 (defun ediff-recenter-one-window (buf-type)
       ;; context must be saved before switching to windows A/B/C
       (let* ((ctl-wind (selected-window))
 	     (shift (ediff-overlay-start
-		     (ediff-get-value-according-to-buffer-type 
+		     (ediff-get-value-according-to-buffer-type
 		      buf-type ediff-narrow-bounds)))
 	     (job-name ediff-job-name)
 	     (control-buf ediff-control-buffer)
 			   buf-type ediff-window-alist))
 	     (window (if (window-live-p (symbol-value window-name))
 			 (symbol-value window-name))))
-	
+
 	(if (and window ediff-windows-job)
 	    (set-window-start window shift))
 	(if window
 	(select-window ctl-wind)
 	)))
 
-	
+
 ;; This will have to be refined for 3way jobs
 (defun ediff-toggle-split ()
-  "Toggle vertical/horizontal window split. 
+  "Toggle vertical/horizontal window split.
 Does nothing if file-A and file-B are in different frames."
   (interactive)
   (ediff-barf-if-not-control-buffer)
 		'split-window-vertically))
       (message "Buffers being compared are in different frames"))
     (ediff-recenter 'no-rehighlight)))
-  
+
 (defun ediff-toggle-hilit ()
   "Switch between highlighting using ASCII flags and highlighting using faces.
-On a dumb terminal, switches between ASCII highlighting and no highlighting." 
+On a dumb terminal, switches between ASCII highlighting and no highlighting."
   (interactive)
   (ediff-barf-if-not-control-buffer)
 
 	 (setq ediff-use-faces            t
 	       ediff-highlighting-style  'face
 	       ediff-highlight-all-diffs  t)))
-  
+
   (if (and ediff-use-faces ediff-highlight-all-diffs)
       (ediff-paint-background-regions)
     (ediff-paint-background-regions 'unhighlight))
-  
+
   (ediff-unselect-and-select-difference
    ediff-current-difference 'select-only))
 
-  
+
 (defun ediff-toggle-autorefine ()
   "Toggle auto-refine mode."
   (interactive)
     (cond ((setq wind (ediff-get-visible-buffer-window ediff-ancestor-buffer))
 	   (raise-frame (window-frame wind)))
 	  (t (set-window-buffer ediff-window-C ediff-ancestor-buffer)))))
-	
+
 (defun ediff-make-or-kill-fine-diffs (arg)
   "Compute fine diffs.  With negative prefix arg, kill fine diffs.
-In both cases, operates on the current difference region." 
+In both cases, operates on the current difference region."
   (interactive "P")
   (ediff-barf-if-not-control-buffer)
   (cond ((eq arg '-)
 	((and (numberp arg) (< arg 0))
 	 (ediff-clear-fine-differences ediff-current-difference))
 	(t (ediff-make-fine-diffs))))
-	 
-  
+
+
 (defun ediff-toggle-help ()
   "Toggle short/long help message."
   (interactive)
   (if (and ediff-use-long-help-message (ediff-multiframe-setup-p))
       (setq ediff-prefer-iconified-control-frame
 	    (ediff-frame-iconified-p ediff-control-frame)))
-	    
+
   (setq ediff-window-config-saved "") ; force redisplay
   (ediff-recenter 'no-rehighlight))
-  
-  
+
+
 ;; If BUF, this is the buffer to toggle, not current buffer.
 (defun ediff-toggle-read-only (&optional buf)
   "Toggle read-only in current buffer.
     (or buf (ediff-recenter))
     (or buf
 	(setq buf (ediff-get-buffer buf-type)))
-	      
+
     (ediff-with-current-buffer buf     ; eval in buf A/B/C
       (let* ((file (buffer-file-name buf))
 	     (file-writable (and file
 		   (message
 		    "Boy, this is risky! Don't modify this file...")
 		   (sit-for 3)))) ; let the user see the warning
-	(if (and toggle-ro-cmd 
+	(if (and toggle-ro-cmd
 		 (string-match "toggle-read-only" (symbol-name toggle-ro-cmd)))
 	    (save-excursion
 	      (save-window-excursion
 		(select-window (ediff-get-visible-buffer-window buf))
 		(command-execute toggle-ro-cmd)))
 	  (error "Don't know how to toggle read-only in buffer %S" buf))
-	
+
 	;; Check if we made the current buffer updatable, but its file is RO.
 	;; Signal a warning in this case.
 	(if (and file (not buffer-read-only)
 	       (ediff-abbreviate-file-name file))))
 	(ediff-with-current-buffer buf
 	  (command-execute checkout-function)))))
-	   
+
 
 ;; This is a simple-minded check for whether a file is under version control.
 ;; If file,v exists but file doesn't, this file is considered to be not checked
 	     ;; 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
   (if (featurep 'jka-compr)
       (string-match (jka-compr-build-file-regexp) file)))
 
-      
+
 (defun ediff-swap-buffers ()
   "Rotate the display of buffers A, B, and C."
   (interactive)
 		  ediff-buffer-B buf)
 	  (setq ediff-buffer-A ediff-buffer-B
 		ediff-buffer-B buf))
-		
+
 	;; swap saved buffer characteristics
 	(if ediff-3way-comparison-job
 	    (setq ediff-buffer-values-orig-A ediff-buffer-values-orig-C
 		  ediff-buffer-values-orig-B values)
 	  (setq ediff-buffer-values-orig-A ediff-buffer-values-orig-B
 		ediff-buffer-values-orig-B values))
-	
+
 	;; swap diff vectors
 	(if ediff-3way-comparison-job
 	    (setq ediff-difference-vector-A ediff-difference-vector-C
 		  ediff-difference-vector-B diff-vec)
 	  (setq ediff-difference-vector-A ediff-difference-vector-B
 		ediff-difference-vector-B diff-vec))
-		
+
 	;; swap hide/focus regexp
 	(if ediff-3way-comparison-job
 	    (setq ediff-regexp-hide-A ediff-regexp-hide-C
 		ediff-regexp-hide-B hide-regexp
 		ediff-regexp-focus-A ediff-regexp-focus-B
 		ediff-regexp-focus-B focus-regexp))
-	
+
 	;; The following is needed for XEmacs, since there one can't move
 	;; overlay to another buffer.  In Emacs, this swap is redundant.
 	(if (ediff-has-face-support-p)
 		      ediff-current-diff-overlay-B overlay)
 	      (setq ediff-current-diff-overlay-A ediff-current-diff-overlay-B
 		    ediff-current-diff-overlay-B overlay)))
-		    
+
 	;; swap wide bounds
 	(setq ediff-wide-bounds
 	      (cond (ediff-3way-comparison-job
 		     (list (nth 1 ediff-wide-bounds)
 			   (nth 0 ediff-wide-bounds)
 			   (nth 2 ediff-wide-bounds)))
-		    (t 
+		    (t
 		     (list (nth 1 ediff-wide-bounds)
 			   (nth 0 ediff-wide-bounds)))))
 	;; swap narrow bounds
 		     (list (nth 1 ediff-narrow-bounds)
 			   (nth 0 ediff-narrow-bounds)
 			   (nth 2 ediff-narrow-bounds)))
-		    (t 
+		    (t
 		     (list (nth 1 ediff-narrow-bounds)
 			   (nth 0 ediff-narrow-bounds)))))
 	(if wide-visibility-p
       (ediff-set-state-of-all-diffs-in-all-buffers ediff-control-buffer))
   (ediff-recenter 'no-rehighlight)
   )
-  
+
 
 (defun ediff-toggle-wide-display ()
   "Toggle wide/regular display.
       (ediff-with-current-buffer ctl-buf
 	(setq ediff-window-B nil) ; force update of window config
 	(ediff-recenter 'no-rehighlight)))))
-	
+
 ;;;###autoload
 (defun ediff-toggle-multiframe ()
   "Switch from multiframe display to single-frame display and back.
 	    (ediff-kill-bottom-toolbar))
 	;; do this only after killing the toolbar
 	(setq ediff-use-toolbar-p (not ediff-use-toolbar-p))
-	
+
 	(mapcar (lambda(buf)
 		  (ediff-with-current-buffer buf
 		    ;; force redisplay
   ;;(selected-frame).
   ;; The problem with this is that any previous bottom-toolbar
   ;; will not re-appear after our cleanup here.  Is there a way
-  ;; to do "push" and "pop" toolbars ?  --marcpa  
+  ;; to do "push" and "pop" toolbars ?  --marcpa
   (if (ediff-use-toolbar-p)
       (ediff-cond-compile-for-xemacs-or-emacs
        (progn ; xemacs
 		   bottom-toolbar
 		   (list frame (if (ediff-3way-comparison-job)
 				   ediff-toolbar-3way ediff-toolbar)))
-		  (set-specifier bottom-toolbar-visible-p (list frame t)) 
+		  (set-specifier bottom-toolbar-visible-p (list frame t))
 		  (set-specifier bottom-toolbar-height
 				 (list frame ediff-toolbar-height)))
 		nil ; emacs
 	       )
 	      ))
     ))
-	       
+
 ;; Merging
 
 (defun ediff-toggle-show-clashes-only ()
     (message "Showing regions that differ from default setting")))
 
 
-	       
+
 ;; Widening/narrowing
 
 (defun ediff-toggle-narrow-region ()
       (setq ediff-visible-bounds ediff-narrow-bounds)
     (setq ediff-visible-bounds ediff-wide-bounds))
   (ediff-recenter 'no-rehighlight))
-  
+
 ;; Narrow bufs A/B/C to ediff-visible-bounds.  If this is currently set to
 ;; ediff-wide-bounds, then this actually widens.
 ;; This function does nothing if job-name is not
-;; ediff-regions-wordwise/linewise or ediff-windows-wordwise/linewise. 
+;; ediff-regions-wordwise/linewise or ediff-windows-wordwise/linewise.
 ;; Does nothing if buffer-A  = buffer-B since we can't narrow
 ;; to two different regions in one buffer.
 (defun ediff-visible-region ()
 	(if (ediff-overlay-buffer overl-B)
 	    (narrow-to-region
 	     (ediff-overlay-start overl-B) (ediff-overlay-end overl-B))))
-      
+
       (if (and ediff-3way-job (ediff-overlay-buffer overl-C))
 	  (ediff-with-current-buffer ediff-buffer-C
 	    (narrow-to-region
 	     (ediff-overlay-start overl-C) (ediff-overlay-end overl-C))))
       )))
-  
+
 
 ;; Window scrolling operations
 
 ;; Usually, errors come from scrolling off the
 ;; beginning or end of the buffer, and this gives error messages.
 (defun ediff-operate-on-windows (operation arg)
-	 
+
   ;; make sure windows aren't dead
   (if (not (and (window-live-p ediff-window-A) (window-live-p ediff-window-B)))
       (ediff-recenter 'no-rehighlight))
 		(or (not ediff-3way-job) ediff-buffer-C)
 		))
       (error ediff-KILLED-VITAL-BUFFER))
-	
+
   (let* ((wind (selected-window))
 	 (wind-A ediff-window-A)
 	 (wind-B ediff-window-B)
 	 (three-way ediff-3way-job)
 	 (coefC (if three-way
 		    (ediff-get-region-size-coefficient 'C operation))))
-	     
+
     (select-window wind-A)
     (condition-case nil
 	(funcall operation (round (* coefA arg)))
 the one half of the height of window-A."
   (interactive "P")
   (ediff-barf-if-not-control-buffer)
-  
+
   ;; make sure windows aren't dead
   (if (not (and (window-live-p ediff-window-A) (window-live-p ediff-window-B)))
       (ediff-recenter 'no-rehighlight))
 		    (ediff-buffer-live-p ediff-buffer-C))
 		))
       (error ediff-KILLED-VITAL-BUFFER))
-      
+
   (ediff-operate-on-windows
    (if (memq last-command-char '(?v ?\C-v))
-       'scroll-up 
+       'scroll-up
      'scroll-down)
    ;; calculate argument to scroll-up/down
    ;; if there is an explicit argument
        (prefix-numeric-value arg)
      ;; if not, see if we can determine a default amount (the window height)
      (let (default-amount)
-       (setq default-amount 
+       (setq default-amount
 	     (- (/ (min (window-height ediff-window-A)
 			(window-height ediff-window-B)
 			(if ediff-3way-job
 the width of the A/B/C windows."
   (interactive "P")
   (ediff-barf-if-not-control-buffer)
-  
+
   ;; make sure windows aren't dead
   (if (not (and (window-live-p ediff-window-A) (window-live-p ediff-window-B)))
       (ediff-recenter 'no-rehighlight))
 		    (ediff-buffer-live-p ediff-buffer-C))
 		))
       (error ediff-KILLED-VITAL-BUFFER))
-    
+
   (ediff-operate-on-windows
    ;; Arrange for scroll-left and scroll-right being called
    ;; interactively so that they set the window's min_hscroll.
    ;; Otherwise, automatic hscrolling will undo the effect of
    ;; hscrolling.
    (if (= last-command-char ?<)
-       (lambda (arg) 
+       (lambda (arg)
 	 (let ((prefix-arg arg))
 	   (call-interactively 'scroll-left)))
      (lambda (arg)
 
 ;;BEG, END show the region to be positioned.
 ;;JOB-NAME holds ediff-job-name.  The ediff-windows job positions regions
-;;differently. 
+;;differently.
 (defun ediff-position-region (beg end pos job-name)
   (if (> end (point-max))
       (setq end (point-max)))
 
 
 (defun ediff-next-difference (&optional arg)
-  "Advance to the next difference. 
+  "Advance to the next difference.
 With a prefix argument, go forward that many differences."
   (interactive "p")
   (ediff-barf-if-not-control-buffer)
       (let ((n (min ediff-number-of-differences
 		    (+ ediff-current-difference (or arg 1))))
 	    non-clash-skip skip-changed regexp-skip)
-	    
+
 	(ediff-visible-region)
 	(or (>= n ediff-number-of-differences)
 	    (setq regexp-skip (funcall ediff-skip-diff-region-function n))
 	    ;; this won't exec if regexp-skip is t
 	    (setq non-clash-skip (ediff-merge-region-is-non-clash n)
-		  skip-changed 
+		  skip-changed
 		  (ediff-skip-merge-region-if-changed-from-default-p n))
 	    (ediff-install-fine-diff-if-necessary n))
 	;; Skip loop
     (error "At end of the difference list")))
 
 (defun ediff-previous-difference (&optional arg)
-  "Go to the previous difference. 
+  "Go to the previous difference.
 With a prefix argument, go back that many differences."
   (interactive "p")
   (ediff-barf-if-not-control-buffer)
   (if (> ediff-current-difference -1)
       (let ((n (max -1 (- ediff-current-difference (or arg 1))))
 	    non-clash-skip skip-changed regexp-skip)
-	    
+
 	(ediff-visible-region)
 	(or (< n 0)
 	    (setq regexp-skip (funcall ediff-skip-diff-region-function n))
 	    ;; this won't exec if regexp-skip is t
 	    (setq non-clash-skip (ediff-merge-region-is-non-clash n)
-		  skip-changed 
+		  skip-changed
 		  (ediff-skip-merge-region-if-changed-from-default-p n))
 	    (ediff-install-fine-diff-if-necessary n))
 	(while (and (> n -1)
       (ediff-unselect-and-select-difference difference-number)
     (error ediff-BAD-DIFF-NUMBER
 	   this-command (1+ difference-number) ediff-number-of-differences)))
-      
+
 (defun ediff-jump-to-difference-at-point (arg)
   "Go to difference closest to the point in buffer A, B, or C.
 The buffer depends on last command character \(a, b, or c\) that invoked this
 	  (select-window ctl-wind)
 	  ))
     ))
-	
-      
+
+
 ;; find region most related to the current point position (or POS, if given)
 ;; returns diff number as seen by the user (i.e., 1+ the internal
-;; representation) 
+;; representation)
 ;; The optional argument WHICH-DIFF can be `after' or `before'.  If `after',
 ;; find the diff after the point.  If `before', find the diff before the
 ;; point.  If the point is inside a diff, return that diff.
 	(prev-end 0)
 	(beg 0)
 	(end 0))
-	
+
     (ediff-with-current-buffer buffer
       (setq pos (or pos (point)))
       (while (and (or (< pos prev-beg) (> pos beg))
 	(setq beg (ediff-get-diff-posn buf-type 'beg diff-no ctl-buffer)
 	      end (ediff-get-diff-posn buf-type 'end diff-no ctl-buffer))
 	)
-      
+
       ;; boost diff-no by 1, if past the last diff region
       (if (and (memq which-diff '(after before))
 	       (> pos beg) (= diff-no max-dif-num))
 	 messg
 	 ediff-verbose-p
 	 reg-to-delete reg-to-delete-beg reg-to-delete-end)
-	
+
     (setq reg-to-delete-beg
 	  (ediff-get-diff-posn to-buf-type 'beg n ctrl-buf))
     (setq reg-to-delete-end
 	  (ediff-get-diff-posn to-buf-type 'end n ctrl-buf))
-	  
+
     (if reg-to-copy
 	(setq from-buf-type nil)
       (setq reg-to-copy (ediff-get-region-contents n from-buf-type ctrl-buf)))
-    
+
     (setq reg-to-delete (ediff-get-region-contents
 			 n to-buf-type ctrl-buf
 			 reg-to-delete-beg reg-to-delete-end))
-    
+
     (if (string= reg-to-delete reg-to-copy)
 	(setq saved-p nil) ; don't copy identical buffers
       ;; seems ok to copy
<