;;; ediff-wind.el --- window manipulation utilities
;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; 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 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
(eval-when-compile
- (require 'ediff-init)
(require 'ediff-util)
- (require 'ediff-help)
- (if (featurep 'xemacs)
- (require 'ediff-tbar))
- )
+ (require 'ediff-help))
;; end pacifier
(require 'ediff-init)
'ediff-setup-windows-plain))
(defcustom ediff-window-setup-function (ediff-choose-window-setup-function-automatically)
- "*Function called to set up windows.
+ "Function called to set up windows.
Ediff provides a choice of two functions: `ediff-setup-windows-plain', for
doing everything in one frame and `ediff-setup-windows-multiframe', which sets
the control panel in a separate frame. By default, the appropriate function is
(defcustom ediff-split-window-function 'split-window-vertically
- "*The function used to split the main window between buffer-A and buffer-B.
+ "The function used to split the main window between buffer-A and buffer-B.
You can set it to a horizontal split instead of the default vertical split
by setting this variable to `split-window-horizontally'.
You can also have your own function to do fancy splits.
:group 'ediff-window)
(defcustom ediff-merge-split-window-function 'split-window-horizontally
- "*The function used to split the main window between buffer-A and buffer-B.
+ "The function used to split the main window between buffer-A and buffer-B.
You can set it to a vertical split instead of the default horizontal split
by setting this variable to `split-window-vertically'.
You can also have your own function to do fancy splits.
"If the user moves mouse more than this many pixels, Ediff won't warp mouse into control window.")
(defcustom ediff-grab-mouse t
- "*If t, Ediff will always grab the mouse and put it in the control frame.
+ "If t, Ediff will always grab the mouse and put it in the control frame.
If 'maybe, Ediff will do it sometimes, but not after operations that require
relatively long time. If nil, the mouse will be entirely user's
responsibility."
:group 'ediff-window)
(defcustom ediff-control-frame-upward-shift 42
- "*The upward shift of control frame from the top of buffer A's frame.
+ "The upward shift of control frame from the top of buffer A's frame.
Measured in pixels.
This is used by the default control frame positioning function,
`ediff-make-frame-position'. This variable is provided for easy
:group 'ediff-window)
(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.
+ "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,
`ediff-make-frame-position' to adjust the position of the control frame
:group 'ediff-window)
(defcustom ediff-wide-control-frame-rightward-shift 7
- "*The rightward shift of control frame from the left edge of buf A's frame.
+ "The rightward shift of control frame from the left edge of buf A's frame.
Measured in characters.
This is used by the default control frame positioning function,
`ediff-make-frame-position' to adjust the position of the control frame
(ediff-defvar-local ediff-control-frame nil "")
(defcustom ediff-prefer-iconified-control-frame nil
- "*If t, keep control panel iconified when help message is off.
+ "If t, keep control panel iconified when help message is off.
This has effect only on a windowing system.
If t, hitting `?' to toggle control panel off iconifies it.
;; this lets us have local versions of ediff-split-window-function
split-window-function ediff-split-window-function
three-way-comparison ediff-3way-comparison-job))
+ ;; if in minibuffer go somewhere else
+ (if (save-match-data
+ (string-match "\*Minibuf-" (buffer-name (window-buffer))))
+ (select-window (next-window nil 'ignore-minibuf)))
(delete-other-windows)
(set-window-dedicated-p (selected-window) nil)
(split-window-vertically)
(cons 'width (cdr (assoc 'width frame-A-params))))
ediff-wide-display-frame frame-A)
(modify-frame-parameters
- frame-A `((left . ,cw) (width . ,wd) (user-position t)))))
+ frame-A `((left . ,cw) (width . ,wd) (user-position . t)))))
;; Revise the mode line to display which difference we have selected
(provide 'ediff-wind)
-;;; Local Variables:
-;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
-;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
-;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
-;;; End:
+;; Local Variables:
+;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
+;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
+;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
+;; End:
;; arch-tag: 73d9a5d7-eed7-4d9c-8b4b-21d5d78eb597
;;; ediff-wind.el ends here