changeset 38334:63281ffd14fd

(winner-equal): Make it a defun. Don't compare Winner configurations with compare-window-configuration; they aren't window configurations.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 09 Jul 2001 12:14:12 +0000
parents 3d30478bb486
children 3cbf1d961d08
files lisp/winner.el
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/winner.el	Mon Jul 09 11:06:29 2001 +0000
+++ b/lisp/winner.el	Mon Jul 09 12:14:12 2001 +0000
@@ -1,6 +1,6 @@
 ;;; winner.el --- Restore old window configurations
 
-;; Copyright (C) 1997, 1998 Free Software Foundation. Inc.
+;; Copyright (C) 1997, 1998, 2001 Free Software Foundation. Inc.
 
 ;; Author: Ivar Rummelhoff <ivarru@math.uio.no>
 ;; Created: 27 Feb 1997
@@ -145,6 +145,16 @@
 ;; Frames affected by the previous command.
 (defvar winner-last-frames nil)
 
+
+(defun winner-equal (a b)
+  "Check two Winner configurations A and B for equality.
+Winner configurations are of the form (CONFIG BUFFERS),
+where CONFIG is a window configuration and BUFFERS is a list of
+buffers."
+  (and (compare-window-configurations (car a) (car b))
+       (equal (cdr a) (cdr b))))
+
+
 ;; Save the current window configuration, if it has changed.
 ;; Then return frame, else return nil.
 (defun winner-insert-if-new (frame)
@@ -427,10 +437,6 @@
 
 ;;; To be evaluated when the package is loaded:
 
-(if (fboundp 'compare-window-configurations)
-    (defalias 'winner-equal 'compare-window-configurations)
-  (defalias 'winner-equal 'equal))
-
 (unless winner-mode-map
   (setq winner-mode-map (make-sparse-keymap))
   (define-key winner-mode-map [(control x) left] 'winner-undo)