]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/ediff-wind.el
Update copyright year to 2016
[gnu-emacs] / lisp / vc / ediff-wind.el
index 124bdbd26df0579e976dd3338c648d81ee9d1eb7..8dbb2f8219873a8c625fabd4279098e1d429d9a8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ediff-wind.el --- window manipulation utilities
 
-;; Copyright (C) 1994-1997, 2000-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1997, 2000-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Package: ediff
@@ -40,7 +40,7 @@
 
 ;; declare-function does not exist in XEmacs
 (eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  r))))
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  _r))))
 
 (require 'ediff-init)
 (require 'ediff-help)
@@ -201,7 +201,7 @@ Used internally---not a user option.")
 
 (defcustom ediff-grab-mouse t
   "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
+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."
   :type 'boolean
@@ -211,7 +211,7 @@ responsibility."
   "Function to call to determine the desired location for the control panel.
 Expects three parameters: the control buffer, the desired width and height
 of the control frame.  It returns an association list
-of the form \(\(top . <position>\) \(left . <position>\)\)"
+of the form \((top . <position>) \(left . <position>))"
   :type 'function
   :group 'ediff-window)
 
@@ -280,7 +280,7 @@ into icons, regardless of the window manager."
 
 ;;; Functions
 
-(defun ediff-get-window-by-clicking (wind prev-wind wind-number)
+(defun ediff-get-window-by-clicking (_wind _prev-wind wind-number)
   (let (event)
     (message
      "Select windows by clicking.  Please click on Window %d " wind-number)
@@ -289,9 +289,9 @@ into icons, regardless of the window manager."
          (beep 1))
       (message "Please click on Window %d " wind-number))
     (ediff-read-event) ; discard event
-    (setq wind (if (featurep 'xemacs)
-                  (event-window event)
-                (posn-window (event-start event))))))
+    (if (featurep 'xemacs)
+        (event-window event)
+      (posn-window (event-start event)))))
 
 
 ;; Select the lowest window on the frame.
@@ -432,7 +432,7 @@ into icons, regardless of the window manager."
            three-way-comparison ediff-3way-comparison-job))
     ;; if in minibuffer go somewhere else
     (if (save-match-data
-         (string-match "\*Minibuf-" (buffer-name (window-buffer))))
+         (string-match "\\*Minibuf-" (buffer-name (window-buffer))))
        (select-window (next-window nil 'ignore-minibuf)))
     (delete-other-windows)
     (set-window-dedicated-p (selected-window) nil)
@@ -861,7 +861,7 @@ into icons, regardless of the window manager."
 ;; create a new splittable frame if none is found
 (defun ediff-skip-unsuitable-frames (&optional ok-unsplittable)
   (if (ediff-window-display-p)
-      (let ((wind-frame (window-frame (selected-window)))
+      (let ((wind-frame (window-frame))
             seen-windows)
        (while (and (not (memq (selected-window) seen-windows))
                    (or
@@ -877,7 +877,7 @@ into icons, regardless of the window manager."
          (setq seen-windows (cons (selected-window) seen-windows))
          ;; try new window
          (other-window 1 t)
-         (setq wind-frame (window-frame (selected-window)))
+         (setq wind-frame (window-frame))
          )
        (if (memq (selected-window) seen-windows)
            ;; fed up, no appropriate frames
@@ -939,7 +939,7 @@ into icons, regardless of the window manager."
 
     (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame))
     (select-frame ctl-frame)
-    (if (window-dedicated-p (selected-window))
+    (if (window-dedicated-p)
        ()
       (delete-other-windows)
       (switch-to-buffer ctl-buffer))