Anonymous avatar Anonymous committed 1e1fc00

* ediff*.el: many minor changes from the emacs tree.

* ediff-util (eqiff-quit): autoraise minibuffer.

* ediff-diff (ediff-convert-fine-diffs-to-overlays): make it a defin
instead of defsubst.

Comments (0)

Files changed (13)

+2008-01-09  Michael Kifer  <kifer@cs.stonybrook.edu>
+	
+	* ediff*.el: many minor changes from the emacs tree.
+	
+	* ediff-util (eqiff-quit): autoraise minibuffer.
+	
+	* ediff-diff (ediff-convert-fine-diffs-to-overlays): make it a defin
+	instead of defsubst.
+	
 2007-11-05  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.72 released.
 ;;; ediff-diff.el --- diff-related utilities
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-;;   2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     (or (featurep 'ediff-util)
-	(load "ediff-util.el" nil nil 'nosuffix))
+	(load "ediff-util.el" nil t 'nosuffix))
     ))
 ;; end pacifier
 
 	    (get-buffer-create (ediff-unique-buffer-name
 				"*ediff-errors" "*"))))
   (ediff-with-current-buffer ediff-error-buffer
+    (setq buffer-undo-list t)
     (erase-buffer)
     (insert (ediff-with-current-buffer diff-buff (buffer-string)))
     (goto-char (point-min))
       )))
 
 
-(defsubst ediff-convert-fine-diffs-to-overlays (diff-list region-num)
+(defun ediff-convert-fine-diffs-to-overlays (diff-list region-num)
   (ediff-set-fine-overlays-in-one-buffer 'A diff-list region-num)
   (ediff-set-fine-overlays-in-one-buffer 'B diff-list region-num)
   (if ediff-3way-job
 ;;; ediff-help.el --- Code related to the contents of Ediff help buffers
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     ))
 ;; end pacifier
 
 
 (define-key
   ediff-help-region-map
-  (if ediff-emacs-p [mouse-2] [button2])
+  (if (featurep 'emacs) [mouse-2] [button2])
   'ediff-help-for-quick-help)
 
 ;; runs in the control buffer
 	    end (match-end 0)
 	    cmd (buffer-substring (match-beginning 1) (match-end 1)))
       (setq overl (ediff-make-overlay beg end))
-      (if ediff-emacs-p
+      (if (featurep 'emacs)
 	  (ediff-overlay-put overl 'mouse-face 'highlight)
 	(ediff-overlay-put overl 'highlight t))
       (ediff-overlay-put overl 'ediff-help-info cmd))))
 ;;; ediff-hook.el --- setup for Ediff's menus and autoloads
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
     () ; if dumping, autoloads are set up in loaddefs.el
   ;; if the user decides to load this file, set up autoloads
   ;; compare files and buffers
-  (autoload 'ediff "ediff" "Compare two files" t)
-  (autoload 'ediff-files "ediff" "Compare two files" t)
-  (autoload 'ediff-buffers "ediff" "Compare two bufers" t)
-  (autoload 'ebuffers "ediff" "Compare two bufers" t)
-  (autoload 'ediff3  "ediff"  "Compare three files" t)
-  (autoload 'ediff-files3 "ediff" "Compare three files" t)
-  (autoload 'ediff-buffers3 "ediff" "Compare three bufers" t)
-  (autoload 'ebuffers3 "ediff" "Compare three bufers" t)
+  (autoload 'ediff "ediff" "Compare two files." t)
+  (autoload 'ediff-files "ediff" "Compare two files." t)
+  (autoload 'ediff-buffers "ediff" "Compare two buffers." t)
+  (autoload 'ebuffers "ediff" "Compare two buffers." t)
+  (autoload 'ediff3  "ediff"  "Compare three files." t)
+  (autoload 'ediff-files3 "ediff" "Compare three files." t)
+  (autoload 'ediff-buffers3 "ediff" "Compare three buffers." t)
+  (autoload 'ebuffers3 "ediff" "Compare three buffers." t)
 
-  (autoload 'erevision "ediff" "Compare versions of a file" t)
-  (autoload 'ediff-revision "ediff" "Compare versions of a file" t)
+  (autoload 'erevision "ediff" "Compare versions of a file." t)
+  (autoload 'ediff-revision "ediff" "Compare versions of a file." t)
 
   ;; compare regions and windows
   (autoload 'ediff-windows-wordwise
 ;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (defvar ediff-multiframe)
 (defvar ediff-use-toolbar-p)
 (defvar mswindowsx-bitmap-file-path)
-
-(and noninteractive
-     (eval-when-compile
-	 (load "ange-ftp" 'noerror)))
 ;; end pacifier
 
-;; Is it XEmacs?
-(defconst ediff-xemacs-p (featurep 'xemacs))
-;; Is it Emacs?
-(defconst ediff-emacs-p (not ediff-xemacs-p))
-
 ;; This is used to avoid compilation warnings. When emacs/xemacs forms can
 ;; generate compile time warnings, we use this macro.
 ;; In this case, the macro will expand into the form that is appropriate to the
   (cond ((ediff-window-display-p))
 	(ediff-force-faces)
 	((ediff-color-display-p))
-	(ediff-emacs-p (memq (ediff-device-type) '(pc)))
-	(ediff-xemacs-p (memq (ediff-device-type) '(tty pc)))
+	((featurep 'emacs) (memq (ediff-device-type) '(pc)))
+	((featurep 'xemacs) (memq (ediff-device-type) '(tty pc)))
 	))
 
 ;; toolbar support for emacs hasn't been implemented in ediff
 *** of %sEmacs, does not seem to be properly installed.
 ***
 *** Please contact your system administrator. "
-				 (if ediff-xemacs-p "X" "")))
+				 (if (featurep 'xemacs) "X" "")))
 
 ;; Selective browsing
 
 ;; testing for sufficiently high Emacs versions.
 (defun ediff-check-version (op major minor &optional type-of-emacs)
   (if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version))
-      (and (cond ((eq type-of-emacs 'xemacs) ediff-xemacs-p)
-		 ((eq type-of-emacs 'emacs) ediff-emacs-p)
+      (and (cond ((eq type-of-emacs 'xemacs) (featurep 'xemacs))
+		 ((eq type-of-emacs 'emacs) (featurep 'emacs))
 		 (t t))
 	   (cond ((eq op '=) (and (= emacs-minor-version minor)
 				  (= emacs-major-version major)))
 
 
 (defface ediff-current-diff-A
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "firebrick" :background "pale green"))
 	(((class color))
 (ediff-hide-face ediff-current-diff-face-A)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
-(if (and ediff-xemacs-p
+(if (and (featurep 'xemacs)
 	 (ediff-has-face-support-p)
 	 (not (ediff-color-display-p)))
     (copy-face 'modeline ediff-current-diff-face-A))
 
 
 (defface ediff-current-diff-B
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "DarkOrchid" :background "Yellow"))
 	(((class color))
 (ediff-hide-face ediff-current-diff-face-B)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
-(if (and ediff-xemacs-p
+(if (and (featurep 'xemacs)
 	 (ediff-has-face-support-p)
 	 (not (ediff-color-display-p)))
     (copy-face 'modeline ediff-current-diff-face-B))
 
 
 (defface ediff-current-diff-C
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "Navy" :background "Pink"))
 	(((class color))
 (ediff-hide-face ediff-current-diff-face-C)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
-(if (and ediff-xemacs-p
+(if (and (featurep 'xemacs)
 	 (ediff-has-face-support-p)
 	 (not (ediff-color-display-p)))
     (copy-face 'modeline ediff-current-diff-face-C))
 
 
 (defface ediff-current-diff-Ancestor
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "Black" :background "VioletRed"))
 	(((class color))
 (ediff-hide-face ediff-current-diff-face-Ancestor)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
-(if (and ediff-xemacs-p
+(if (and (featurep 'xemacs)
 	 (ediff-has-face-support-p)
 	 (not (ediff-color-display-p)))
     (copy-face 'modeline ediff-current-diff-face-Ancestor))
 
 
 (defface ediff-fine-diff-A
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "Navy" :background "sky blue"))
 	(((class color))
 (ediff-hide-face ediff-fine-diff-face-A)
 
 (defface ediff-fine-diff-B
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "Black" :background "cyan"))
 	(((class color))
 (ediff-hide-face ediff-fine-diff-face-B)
 
 (defface ediff-fine-diff-C
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((type pc))
 	 (:foreground "white" :background "Turquoise"))
 	(((class color) (min-colors 16))
 (ediff-hide-face ediff-fine-diff-face-C)
 
 (defface ediff-fine-diff-Ancestor
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "Black" :background "Green"))
 	(((class color))
 	(t "Stipple")))
 
 (defface ediff-even-diff-A
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       `((((type pc))
 	 (:foreground "green3" :background "light grey"))
 	(((class color) (min-colors 16))
 (ediff-hide-face ediff-even-diff-face-A)
 
 (defface ediff-even-diff-B
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       `((((class color) (min-colors 16))
 	 (:foreground "White" :background "Grey"))
 	(((class color))
 (ediff-hide-face ediff-even-diff-face-B)
 
 (defface ediff-even-diff-C
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       `((((type pc))
 	 (:foreground "yellow3" :background "light grey"))
 	(((class color) (min-colors 16))
 (ediff-hide-face ediff-even-diff-face-C)
 
 (defface ediff-even-diff-Ancestor
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       `((((type pc))
 	 (:foreground "cyan3" :background "light grey"))
 	(((class color) (min-colors 16))
     (Ancestor . ediff-even-diff-Ancestor)))
 
 (defface ediff-odd-diff-A
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((type pc))
 	 (:foreground "green3" :background "gray40"))
 	(((class color) (min-colors 16))
 
 
 (defface ediff-odd-diff-B
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((type pc))
 	 (:foreground "White" :background "gray40"))
 	(((class color) (min-colors 16))
 (ediff-hide-face ediff-odd-diff-face-B)
 
 (defface ediff-odd-diff-C
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((type pc))
 	 (:foreground "yellow3" :background "gray40"))
 	(((class color) (min-colors 16))
 (ediff-hide-face ediff-odd-diff-face-C)
 
 (defface ediff-odd-diff-Ancestor
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       '((((class color) (min-colors 16))
 	 (:foreground "cyan3" :background "gray40"))
 	(((class color))
 	 )
 	((ediff-key-press-event-p event)
 	 (point))
-	(t (error nil))))
+	(t (error "Error"))))
 
 (defun ediff-event-buffer (event)
   (cond ((ediff-mouse-event-p event)
 	 )
 	((ediff-key-press-event-p event)
 	 (current-buffer))
-	(t (error nil))))
+	(t (error "Error"))))
 
 (defun ediff-event-key (event-or-key)
   (ediff-cond-compile-for-xemacs-or-emacs
   (or frame (setq frame (selected-frame)))
   (if (ediff-window-display-p)
       (let ((frame-or-wind frame))
-	(if ediff-xemacs-p
+	(if (featurep 'xemacs)
 	    (setq frame-or-wind (frame-selected-window frame)))
 	(or do-not-grab-mouse
 	    ;; don't set mouse if the user said to never do this
 ;;; ediff-merg.el --- merging utilities
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     (or (featurep 'ediff-util)
-	(load "ediff-util.el" nil nil 'nosuffix))
+	(load "ediff-util.el" nil t 'nosuffix))
     ))
 ;; end pacifier
 
 ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     (or (featurep 'ediff-util)
-	(load "ediff-util.el" nil nil 'nosuffix))
+	(load "ediff-util.el" nil t 'nosuffix))
     ))
 ;; end pacifier
 
 	(define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files)))
   (if ediff-no-emacs-help-in-control-buffer
       (define-key ediff-meta-buffer-map  "\C-h"  'ediff-previous-meta-item))
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       (define-key ediff-meta-buffer-map [mouse-2] ediff-meta-action-function)
     (define-key ediff-meta-buffer-map [button2] ediff-meta-action-function))
 
 (define-key ediff-dir-diffs-buffer-map "\C-?" 'previous-line)
 (define-key ediff-dir-diffs-buffer-map "p" 'previous-line)
 (define-key ediff-dir-diffs-buffer-map "C" 'ediff-dir-diff-copy-file)
-(if ediff-emacs-p
+(if (featurep 'emacs)
     (define-key ediff-dir-diffs-buffer-map [mouse-2] 'ediff-dir-diff-copy-file)
   (define-key ediff-dir-diffs-buffer-map [button2] 'ediff-dir-diff-copy-file))
 (define-key ediff-dir-diffs-buffer-map [delete] 'previous-line)
 (defun ediff-set-meta-overlay (b e prop &optional session-number hidden)
   (let (overl)
     (setq overl (ediff-make-overlay b e))
-    (if ediff-emacs-p
+    (if (featurep 'emacs)
 	(ediff-overlay-put overl 'mouse-face 'highlight)
       (ediff-overlay-put overl 'highlight t))
     (ediff-overlay-put overl 'ediff-meta-info prop)
 ;;; ediff-ptch.el --- Ediff's  patch support
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     (or (featurep 'ediff-mult)
-	(load "ediff-mult.el" nil nil 'nosuffix))
+	(load "ediff-mult.el" nil t 'nosuffix))
     (or (featurep 'ediff)
-	(load "ediff.el" nil nil 'nosuffix))
+	(load "ediff.el" nil t 'nosuffix))
     ))
 ;; end pacifier
 
 (require 'ediff-init)
 
 (defvar ediff-toolbar-icon-directory
-  (if (and ediff-xemacs-p (featurep 'toolbar))
+  (if (and (featurep 'xemacs) (featurep 'toolbar))
       (let ((dir (locate-data-directory "ediff")))
 	(if (stringp dir)
 	    dir
 ;;; ediff-util.el --- the core commands and utilities of ediff
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (defvar bottom-toolbar-visible-p)
 (defvar bottom-toolbar-height)
 (defvar mark-active)
-(defvar ediff-emacs-p)
 
 (defvar ediff-after-quit-hook-internal nil)
 
-(and noninteractive
-     (eval-when-compile
-	 (load "reporter" 'noerror)))
-
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (provide 'ediff-util) ; to break recursive load cycle
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     (or (featurep 'ediff-help)
-	(load "ediff-help.el" nil nil 'nosuffix))
+	(load "ediff-help.el" nil t 'nosuffix))
     (or (featurep 'ediff-mult)
-	(load "ediff-mult.el" nil nil 'nosuffix))
+	(load "ediff-mult.el" nil t 'nosuffix))
     (or (featurep 'ediff-wind)
-	(load "ediff-wind.el" nil nil 'nosuffix))
+	(load "ediff-wind.el" nil t 'nosuffix))
     (or (featurep 'ediff-diff)
-	(load "ediff-diff.el" nil nil 'nosuffix))
+	(load "ediff-diff.el" nil t 'nosuffix))
     (or (featurep 'ediff-merg)
-	(load "ediff-merg.el" nil nil 'nosuffix))
+	(load "ediff-merg.el" nil t 'nosuffix))
     (or (featurep 'ediff)
-	(load "ediff.el" nil nil 'nosuffix))
+	(load "ediff.el" nil t 'nosuffix))
     (or (featurep 'ediff-tbar)
-	ediff-emacs-p
+	(featurep 'emacs)
 	(load "ediff-tbar.el" 'noerror nil 'nosuffix))
     ))
 ;; end pacifier
 (require 'ediff-diff)
 (require 'ediff-merg)
 
-(if ediff-xemacs-p
+(if (featurep 'xemacs)
     (require 'ediff-tbar))
 
 
   (suppress-keymap ediff-mode-map)
 
   (define-key ediff-mode-map
-    (if ediff-emacs-p [mouse-2] [button2]) 'ediff-help-for-quick-help)
+    (if (featurep 'emacs) [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 "p" 'ediff-previous-difference)
       (setq ediff-error-buffer
 	    (get-buffer-create (ediff-unique-buffer-name "*ediff-errors" "*")))
 
+      (with-current-buffer ediff-error-buffer
+	(setq buffer-undo-list t))
+
       (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
   (ediff-barf-if-not-control-buffer)
   (or (ediff-window-display-p)
       (error "%sEmacs is not running as a window application"
-	     (if ediff-emacs-p "" "X")))
+	     (if (featurep 'emacs) "" "X")))
   (ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows
   (let ((ctl-buf ediff-control-buffer))
     (setq ediff-wide-display-p (not ediff-wide-display-p))
 	(ediff-with-current-buffer ctl-buf
 	  (modify-frame-parameters
 	   ediff-wide-display-frame ediff-wide-display-orig-parameters)
-	  ;;(sit-for (if ediff-xemacs-p 0.4 0))
+	  ;;(sit-for (if (featurep 'xemacs) 0.4 0))
 	  ;; restore control buf, since ctl window may have been deleted
 	  ;; during resizing
 	  (set-buffer ctl-buf)
 		ediff-window-B nil) ; force update of window config
 	  (ediff-recenter 'no-rehighlight))
       (funcall ediff-make-wide-display-function)
-      ;;(sit-for (if ediff-xemacs-p 0.4 0))
+      ;;(sit-for (if (featurep 'xemacs) 0.4 0))
       (ediff-with-current-buffer ctl-buf
 	(setq ediff-window-B nil) ; force update of window config
 	(ediff-recenter 'no-rehighlight)))))
   (let (window-setup-func)
     (or (ediff-window-display-p)
 	(error "%sEmacs is not running as a window application"
-	       (if ediff-emacs-p "" "X")))
+	       (if (featurep 'emacs) "" "X")))
 
   (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe)
 	 (setq window-setup-func 'ediff-setup-windows-plain))
       (progn
 	(or (ediff-window-display-p)
 	    (error "%sEmacs is not running as a window application"
-		   (if ediff-emacs-p "" "X")))
+		   (if (featurep 'emacs) "" "X")))
 	(if (ediff-use-toolbar-p)
 	    (ediff-kill-bottom-toolbar))
 	;; do this only after killing the toolbar
 temporarily reverses the meaning of this variable."
   (interactive "P")
   (ediff-barf-if-not-control-buffer)
-  (let ((ctl-buf (current-buffer)))
+  (let ((ctl-buf (current-buffer))
+	(ctl-frm (selected-frame))
+	(minibuffer-auto-raise t))
     (if (y-or-n-p (format "Quit this Ediff session%s? "
 			  (if (ediff-buffer-live-p ediff-meta-buffer)
 			      " & show containing session group" "")))
 	  (message "")
 	  (set-buffer ctl-buf)
 	  (ediff-really-quit reverse-default-keep-variants))
+      (select-frame ctl-frm)
+      (raise-frame ctl-frm)
       (message ""))))
 
 
 	(cond ((ediff-good-frame-under-mouse))
 	      (t warp-frame)))
   (if (and (ediff-window-display-p) (frame-live-p warp-frame) ediff-grab-mouse)
-      (set-mouse-position (if ediff-emacs-p
+      (set-mouse-position (if (featurep 'emacs)
 			      warp-frame
 			    (frame-selected-window warp-frame))
 			  2 1))
 	(buf-name "")
 	frame obj-ok)
     (setq obj-ok
-	  (if ediff-emacs-p
+	  (if (featurep 'emacs)
 	      (frame-live-p frame-or-win)
 	    (window-live-p frame-or-win)))
     (if obj-ok
-	(setq frame (if ediff-emacs-p frame-or-win (window-frame frame-or-win))
+	(setq frame (if (featurep 'emacs) frame-or-win (window-frame frame-or-win))
 	      buf-name
 	      (buffer-name (window-buffer (frame-selected-window frame)))))
     (if (string-match "Minibuf" buf-name)
    "To resume, type M-x eregistry and select the desired Ediff session"))
 
 
+;; ediff-barf-if-not-control-buffer ensures only called from ediff.
+;; declare-function does not exist in XEmacs
+;;(declare-function ediff-version "ediff" ()))
+
 (defun ediff-status-info ()
   "Show the names of the buffers or files being operated on by Ediff.
 Hit \\[ediff-recenter] to reset the windows afterward."
 	       (ediff-get-symbol-from-alist
 		buf-type ediff-current-diff-overlay-alist))))
 
-	(if ediff-xemacs-p
+	(if (featurep 'xemacs)
 	    (ediff-move-overlay current-diff-overlay begin end-hilit)
 	  (ediff-move-overlay current-diff-overlay begin end-hilit buff))
 	(ediff-overlay-put current-diff-overlay 'priority
 (defun ediff-remove-flags-from-buffer (buffer overlay)
   (ediff-with-current-buffer buffer
     (let ((inhibit-read-only t))
-      (if ediff-xemacs-p
+      (if (featurep 'xemacs)
 	  (ediff-overlay-put overlay 'begin-glyph nil)
 	(ediff-overlay-put overlay 'before-string nil))
 
-      (if ediff-xemacs-p
+      (if (featurep 'xemacs)
 	  (ediff-overlay-put overlay 'end-glyph nil)
 	(ediff-overlay-put overlay 'after-string nil))
       )))
 			 ediff-before-flag-bol ediff-before-flag-mol))))
 
     ;; insert the flag itself
-    (if ediff-xemacs-p
+    (if (featurep 'xemacs)
 	(ediff-overlay-put curr-overl 'begin-glyph flag)
       (ediff-overlay-put curr-overl 'before-string flag))
 
 			 ediff-after-flag-eol ediff-after-flag-mol))))
 
     ;; insert the flag itself
-    (if ediff-xemacs-p
+    (if (featurep 'xemacs)
 	(ediff-overlay-put curr-overl 'end-glyph flag)
       (ediff-overlay-put curr-overl 'after-string flag))
     ))
 
 	  ;; never detach
 	  (ediff-overlay-put
-	   overl (if ediff-emacs-p 'evaporate 'detachable) nil)
+	   overl (if (featurep 'emacs) 'evaporate 'detachable) nil)
 	  ;; make overlay open-ended
 	  ;; In emacs, it is made open ended at creation time
-	  (if ediff-xemacs-p
+	  (if (featurep 'xemacs)
 	      (progn
 		(ediff-overlay-put overl 'start-open nil)
 		(ediff-overlay-put overl 'end-open nil)))
 ;;; ediff-vers.el --- version control interface to Ediff
 
 ;; Copyright (C) 1995, 1996, 1997, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 	 (load "rcs" 'noerror)
 	 ;; (load "vc" 'noerror) ; this sometimes causes compiler error
 	 (or (featurep 'ediff-init)
-	     (load "ediff-init.el" nil nil 'nosuffix))
+	     (load "ediff-init.el" nil t 'nosuffix))
 	 )))
 ;; end pacifier
 
 ;;; ediff-wind.el --- window manipulation utilities
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
 (defvar top-gutter)
 (defvar frame-icon-title-format)
 (defvar ediff-diff-status)
-(defvar ediff-emacs-p)
 
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     (or (featurep 'ediff-util)
-	(load "ediff-util.el" nil nil 'nosuffix))
+	(load "ediff-util.el" nil t 'nosuffix))
     (or (featurep 'ediff-help)
-	(load "ediff-help.el" nil nil 'nosuffix))
+	(load "ediff-help.el" nil t 'nosuffix))
     (or (featurep 'ediff-tbar)
-	ediff-emacs-p
+	(featurep 'emacs)
 	(load "ediff-tbar.el" 'noerror nil 'nosuffix))
     ))
 ;; end pacifier
 (require 'ediff-init)
 
 ;; be careful with ediff-tbar
-(if ediff-xemacs-p
+(if (featurep 'xemacs)
     (condition-case nil
 	(require 'ediff-tbar)
       (error
 doing everything in one frame, `ediff-setup-windows-multiframe', which sets
 the control panel in a separate frame, and
 `ediff-setup-windows-automatic' (the default), which chooses an appropriate
-behaviour based on the current window system.  If the multiframe function
+behavior based on the current window system.  If the multiframe function
 detects that one of the buffers A/B is seen in some other frame, it will try
 to keep that buffer in that frame.
 
   :type 'function
   :group 'ediff-window)
 
+;; declare-function does not exist in XEmacs
+;; Definitions hidden from the compiler by compat wrappers.
+;;(declare-function ediff-display-pixel-width "ediff-init")
+;;(declare-function ediff-display-pixel-height "ediff-init")
+
 (defconst ediff-control-frame-parameters
   (list
    '(name . "Ediff")
   :type 'integer
   :group 'ediff-window)
 
-(defcustom ediff-narrow-control-frame-leftward-shift (if ediff-xemacs-p 7 3)
+(defcustom ediff-narrow-control-frame-leftward-shift (if (featurep 'xemacs) 7 3)
   "*The leftward shift of control frame from the right edge of buf A's frame.
 Measured in characters.
 This is used by the default control frame positioning function,
     ;; XEmacs used to have a lot of trouble with display
     ;; It did't set things right unless we tell it to sit still
     ;; 19.12 seems ok.
-    ;;(if ediff-xemacs-p (sit-for 0))
+    ;;(if (featurep 'xemacs) (sit-for 0))
 
     (split-window-vertically (max 2 (- (window-height) merge-window-lines)))
     (if (eq (selected-window) wind-A)
     ;; XEmacs used to have a lot of trouble with display
     ;; It did't set things right unless we told it to sit still
     ;; 19.12 seems ok.
-    ;;(if ediff-xemacs-p (sit-for 0))
+    ;;(if (featurep 'xemacs) (sit-for 0))
 
     (funcall split-window-function wind-width-or-height)
 
 			   (or (eq this-command 'ediff-quit)
 			       (not (eq ediff-grab-mouse t)))))
 
-    (if ediff-xemacs-p
+    (if (featurep 'xemacs)
 	(ediff-with-current-buffer ctl-buffer
 	  (ediff-cond-compile-for-xemacs-or-emacs
 	   (make-local-hook 'select-frame-hook) ; xemacs
 
 
 (defun ediff-refresh-control-frame ()
-  (if ediff-emacs-p
+  (if (featurep 'emacs)
       ;; set frame/icon titles for Emacs
       (modify-frame-parameters
        ediff-control-frame
 ;; If buff is not live, return nil
 (defun ediff-get-visible-buffer-window (buff)
   (if (ediff-buffer-live-p buff)
-      (if ediff-xemacs-p
+      (if (featurep 'xemacs)
 	  (get-buffer-window buff t)
 	(get-buffer-window buff 'visible))))
 
 ;;; ediff.el --- a comprehensive visual interface to diff & patch
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Created: February 2, 1994
 ;; Keywords: comparing, merging, patching, tools, unix
 
 (defconst ediff-version "2.81.2" "The current version of Ediff")
-(defconst ediff-date "August 18, 2007" "Date of last update")
+(defconst ediff-date "January 09, 2008" "Date of last update")
 
 
 ;; This file is part of GNU Emacs.
 (defvar ediff-last-dir-patch)
 (defvar ediff-patch-default-directory)
 
-(and noninteractive
-     (eval-when-compile
-	 (load-library "dired")
-	 (load-library "info")
-	 (load "pcl-cvs" 'noerror)))
+
 (eval-when-compile
+  (and noninteractive
+       (load "dired" nil t))
   (let ((load-path (cons (expand-file-name ".") load-path)))
     (provide 'ediff) ; to break recursive load cycle
     (or (featurep 'ediff-init)
-	(load "ediff-init.el" nil nil 'nosuffix))
+	(load "ediff-init.el" nil t 'nosuffix))
     (or (featurep 'ediff-mult)
-	(load "ediff-mult.el" nil nil 'nosuffix))
+	(load "ediff-mult.el" nil t 'nosuffix))
     (or (featurep 'ediff-ptch)
-	(load "ediff-ptch.el" nil nil 'nosuffix))
+	(load "ediff-ptch.el" nil t 'nosuffix))
     (or (featurep 'ediff-vers)
-	(load "ediff-vers.el" nil nil 'nosuffix))
+	(load "ediff-vers.el" nil t 'nosuffix))
     ))
 ;; end pacifier
 
 		 (list (cons 'ediff-job-name job-name))
 		 merge-buffer-file)))
 
+;; declare-function does not exist in XEmacs
+;;(declare-function diff-latest-backup-file "diff" (fn)))
 
 ;;;###autoload
 (defalias 'ediff 'ediff-files)
 When called interactively, displays the version."
   (interactive)
   (if (interactive-p)
-      (message (ediff-version))
+      (message "%s" (ediff-version))
     (format "Ediff %s of %s" ediff-version ediff-date)))
 
+;; info is run first, and will autoload info.el.
+;;(declare-function Info-goto-node "info" (nodename &optional fork))
 
 ;;;###autoload
 (defun ediff-documentation (&optional node)
     (condition-case nil
 	(progn
 	  (pop-to-buffer (get-buffer-create "*info*"))
-	  (info (if ediff-xemacs-p "ediff.info" "ediff"))
+	  (info (if (featurep 'xemacs) "ediff.info" "ediff"))
 	  (if node
 	      (Info-goto-node node)
 	    (message "Type `i' to search for a specific topic"))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.