;;; ediff-wind.el --- window manipulation utilities
;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
(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)
+;; 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")
'(scrollbar-height . 0) ; XEmacs only
'(menu-bar-lines . 0) ; Emacs only
'(tool-bar-lines . 0) ; Emacs 21+ only
+ '(left-fringe . 0)
+ '(right-fringe . 0)
;; don't lower but auto-raise
'(auto-lower . nil)
'(auto-raise . t)
: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))))