Remove incorrect uses of "modeline".
[bpt/emacs.git] / lisp / vc / ediff-wind.el
index 8b16c5a..cc8ef4a 100644 (file)
@@ -1,7 +1,6 @@
 ;;; ediff-wind.el --- window manipulation utilities
 
-;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1997, 2000-2012  Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Package: ediff
       'ediff-setup-windows-multiframe
     'ediff-setup-windows-plain))
 
-(defcustom ediff-window-setup-function (ediff-choose-window-setup-function-automatically)
+(make-obsolete 'ediff-choose-window-setup-function-automatically
+              'ediff-setup-windows-default "24.2")
+
+(defcustom ediff-window-setup-function 'ediff-setup-windows-default
   "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
-chosen automatically depending on the current window system.
-However, `ediff-toggle-multiframe' can be used to toggle between the multiframe
-display and the single frame display.
-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.
+Ediff provides a choice of three functions:
+ (1) `ediff-setup-windows-multiframe', which sets the control panel
+     in a separate frame.
+ (2) `ediff-setup-windows-plain', which does everything in one frame
+ (3) `ediff-setup-windows-default' (the default), which does (1)
+     on a graphical display and (2) on a text terminal.
+
+The command \\[ediff-toggle-multiframe] can be used to toggle
+between the multiframe display and the single frame display.  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.
 
 If you don't like any of the two provided functions, write your own one.
 The basic guidelines:
@@ -91,10 +97,12 @@ The basic guidelines:
        Buffer C may not be used in jobs that compare only two buffers.
 If you plan to do something fancy, take a close look at how the two
 provided functions are written."
-  :type '(choice (const :tag "Multi Frame" ediff-setup-windows-multiframe)
+  :type '(choice (const :tag "Choose Automatically" ediff-setup-windows-default)
+                (const :tag "Multi Frame" ediff-setup-windows-multiframe)
                 (const :tag "Single Frame" ediff-setup-windows-plain)
                 (function :tag "Other function"))
-  :group 'ediff-window)
+  :group 'ediff-window
+  :version "24.2")
 
 ;; indicates if we are in a multiframe setup
 (ediff-defvar-local ediff-multiframe nil "")
@@ -334,6 +342,12 @@ into icons, regardless of the window manager."
        buffer-A buffer-B buffer-C control-buffer))
   (run-hooks 'ediff-after-setup-windows-hook))
 
+(defun ediff-setup-windows-default (buffer-A buffer-B buffer-C control-buffer)
+  (funcall (if (display-graphic-p)
+              'ediff-setup-windows-multiframe
+            'ediff-setup-windows-plain)
+          buffer-A buffer-B buffer-C control-buffer))
+
 ;; Just set up 3 windows.
 ;; Usually used without windowing systems
 ;; With windowing, we want to use dedicated frames.
@@ -943,7 +957,7 @@ into icons, regardless of the window manager."
          (and (eq this-command 'ediff-toggle-help)
               dont-iconify-ctl-frame))
 
-    ;; 1 more line for the modeline
+    ;; 1 more line for the mode line
     (setq lines (1+ (count-lines (point-min) (point-max)))
          fheight lines
          fwidth (max (+ (ediff-help-message-line-length) 2)
@@ -978,12 +992,11 @@ into icons, regardless of the window manager."
          (set-specifier left-toolbar-width (list ctl-frame 0))
          (set-specifier right-toolbar-width (list ctl-frame 0))))
 
-    ;; Under OS/2 (emx) we have to call modify frame parameters twice, in order
-    ;; to make sure that at least once we do it for non-iconified frame.  If
-    ;; appears that in the OS/2 port of Emacs, one can't modify frame
-    ;; parameters of iconified frames.  As a precaution, we do likewise for
-    ;; windows-nt.
-    (if (memq system-type '(emx windows-nt windows-95))
+    ;; As a precaution, we call modify frame parameters twice, in
+    ;; order to make sure that at least once we do it for
+    ;; a non-iconified frame.  (It appears that in the Windows port of
+    ;; Emacs, one can't modify frame parameters of iconified frames.)
+    (if (eq system-type 'windows-nt)
        (modify-frame-parameters ctl-frame adjusted-parameters))
 
     ;; make or zap toolbar (if not requested)
@@ -1128,8 +1141,8 @@ It assumes that it is called from within the control buffer."
 
 
 ;; Revise the mode line to display which difference we have selected
-;; Also resets modelines of buffers A/B, since they may be clobbered by
-;; anothe invocations of Ediff.
+;; Also resets mode lines of buffers A/B, since they may be clobbered by
+;; other invocations of Ediff.
 (defun ediff-refresh-mode-lines ()
   (let (buf-A-state-diff buf-B-state-diff buf-C-state-diff buf-C-state-merge)
 
@@ -1310,5 +1323,4 @@ It assumes that it is called from within the control buffer."
 ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
 ;; End:
 
-;; arch-tag: 73d9a5d7-eed7-4d9c-8b4b-21d5d78eb597
 ;;; ediff-wind.el ends here