]> code.delx.au - gnu-emacs/blobdiff - lisp/winner.el
Johan Bockg� <bojohan at gnu.org>
[gnu-emacs] / lisp / winner.el
index bc7503b963c853904e83830b4aedefa40732b089..5e9d6a3212e90e434116d9ce5f089db79b190e39 100644 (file)
@@ -1,11 +1,10 @@
 ;;; winner.el --- Restore old window configurations
 
 ;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation. Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation. Inc.
 
 ;; Author: Ivar Rummelhoff <ivarru@math.uio.no>
 ;; Created: 27 Feb 1997
-;; Time-stamp: <2006-02-06 15:13:57 ttn>
 ;; Keywords: convenience frames
 
 ;; This file is part of GNU Emacs.
 
 
 (defmacro winner-active-region ()
-  (if (fboundp 'region-active-p)
-      '(region-active-p)
-    'mark-active))
+  (if (boundp 'mark-active)
+      'mark-active
+    '(region-active-p)))
 
 (defsetf winner-active-region () (store)
-  (if (fboundp 'zmacs-activate-region)
+  (if (featurep 'xemacs)
       `(if ,store (zmacs-activate-region)
         (zmacs-deactivate-region))
     `(setq mark-active ,store)))
 
 (require 'ring)
 
-(unless (fboundp 'defgroup)
-  (defmacro defgroup (&rest rest)))
-
 (defgroup winner nil
   "Restoring window configurations."
   :group 'windows)
 
-(unless (fboundp 'defcustom)
-  (defmacro defcustom (symbol &optional initvalue docs &rest rest)
-    (list 'defvar symbol initvalue docs)))
-
 ;;;###autoload
 (defcustom winner-mode nil
   "Toggle Winner mode.
@@ -286,7 +278,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
 
 (defun winner-get-point (buf win)
   ;; Consult (and possibly extend) `winner-point-alist'.
-  ;; Returns nil iff buf no longer exists.
+  ;; Returns nil if buf no longer exists.
   (when (buffer-name buf)
     (let ((entry (assq buf winner-point-alist)))
       (cond
@@ -306,7 +298,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
 \f
 ;; Make sure point does not end up in the minibuffer and delete
 ;; windows displaying dead or boring buffers
-;; (c.f. `winner-boring-buffers').  Return nil iff all the windows
+;; (c.f. `winner-boring-buffers').  Return nil if all the windows
 ;; should be deleted.  Preserve correct points and marks.
 (defun winner-set (conf)
   ;; For the format of `conf', see `winner-conf'.