X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/67f3ad67ee317226cb5d1bb139de0cfd883fdc5e..c65e95328190d327796ba5d5d26f58ae093a9b30:/lisp/ediff-wind.el diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el index c9162129e0..e13d89ac6e 100644 --- a/lisp/ediff-wind.el +++ b/lisp/ediff-wind.el @@ -9,7 +9,7 @@ ;; 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, @@ -39,18 +39,17 @@ (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 @@ -58,7 +57,7 @@ (require 'ediff-init) ;; be careful with ediff-tbar -(if ediff-xemacs-p +(if (featurep 'xemacs) (condition-case nil (require 'ediff-tbar) (error @@ -78,7 +77,7 @@ Ediff provides a choice of three functions: `ediff-setup-windows-plain', for 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. @@ -148,6 +147,10 @@ In this case, Ediff will use those frames to display these buffers." :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") @@ -213,7 +216,7 @@ customization of the default control frame positioning." :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, @@ -380,7 +383,7 @@ into icons, regardless of the window manager." ;; 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) @@ -443,7 +446,7 @@ into icons, regardless of the window manager." ;; 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) @@ -1043,7 +1046,7 @@ into icons, regardless of the window manager." (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 @@ -1238,7 +1241,7 @@ It assumes that it is called from within the control buffer." (defun ediff-refresh-control-frame () - (if ediff-emacs-p + (if (featurep 'emacs) ;; set frame/icon titles for Emacs (modify-frame-parameters ediff-control-frame @@ -1288,7 +1291,7 @@ It assumes that it is called from within the control buffer." ;; 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))))