]> code.delx.au - gnu-emacs/blobdiff - lisp/winner.el
(compilation-error-regexp-alist-alist) extend irix for NAG Fortran and add ftnchek-*
[gnu-emacs] / lisp / winner.el
index 68c1df9f2b5bc458a81c522154e253ea0f119537..e5b48889156fef3131cfbd38e64c3dd78e009291 100644 (file)
@@ -1,6 +1,6 @@
 ;;; winner.el --- Restore old window configurations
 
-;; Copyright (C) 1997, 1998, 2001 Free Software Foundation. Inc.
+;; Copyright (C) 1997, 1998, 2001, 2004 Free Software Foundation. Inc.
 
 ;; Author: Ivar Rummelhoff <ivarru@math.uio.no>
 ;; Created: 27 Feb 1997
@@ -30,8 +30,8 @@
 ;; window configuration (i.e. how the frames are partitioned into
 ;; windows) so that the changes can be "undone" using the command
 ;; `winner-undo'.  By default this one is bound to the key sequence
-;; ctrl-x left.  If you change your mind (while undoing), you can
-;; press ctrl-x right (calling `winner-redo').  Even though it uses
+;; ctrl-c left.  If you change your mind (while undoing), you can
+;; press ctrl-c right (calling `winner-redo').  Even though it uses
 ;; some features of Emacs20.3, winner.el should also work with
 ;; Emacs19.34 and XEmacs20, provided that the installed version of
 ;; custom is not obsolete.
@@ -128,11 +128,11 @@ You may want to include buffer names such as *Help*, *Apropos*,
                 while (= a b)
                 finally return (< a b)))))
 
-(defun winner-win-data () 
+(defun winner-win-data ()
   ;; Essential properties of the windows in the selected frame.
   (loop for win in (winner-sorted-window-list)
         collect (cons (winner-edges win) (window-buffer win))))
-        
+
 ;; This variable is updated with the current window configuration
 ;; every time it changes.
 (defvar winner-currents nil)
@@ -262,7 +262,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
      ((window-live-p chosen) (select-window chosen))
      ((window-minibuffer-p (selected-window))
       (other-window 1)))
-    (when (/= minisize (window-height miniwin)) 
+    (when (/= minisize (window-height miniwin))
       (letf (((selected-window) miniwin) )
         (setf (window-height) minisize)))))
 
@@ -279,7 +279,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
   (letf (((current-buffer)))
     (loop with alist
          for win in (winner-window-list)
-         for entry = 
+         for entry =
           (or (assq (window-buffer win) alist)
               (car (push (list (set-buffer (window-buffer win))
                                (cons (mark t) (winner-active-region)))
@@ -335,7 +335,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
 
       ;; Restore marks
       (letf (((current-buffer)))
-       (loop for buf in buffers 
+       (loop for buf in buffers
              for entry = (cadr (assq buf winner-point-alist))
              do (progn (set-buffer buf)
                        (set-mark (car entry))
@@ -384,7 +384,7 @@ With arg, turn Winner mode on if and only if arg is positive."
                (not winner-mode))))
     (cond
      ;; Turn mode on
-     (on-p 
+     (on-p
       (setq winner-mode t)
       (cond
        ((winner-hook-installed-p)
@@ -435,16 +435,16 @@ In other words, \"undo\" changes in window configuration."
        (message "Winner undo (%d / %d)"
                 winner-undo-counter
                 (1- (ring-length winner-pending-undo-ring)))))))
-        
+
+
+
 \f(defun winner-undo-this ()            ; The heart of winner undo.
-  (loop 
+  (loop
    (cond
     ((>= winner-undo-counter (ring-length winner-pending-undo-ring))
      (message "No further window configuration undo information")
      (return nil))
+
     ((and                              ; If possible configuration
       (winner-set (ring-ref winner-pending-undo-ring
                            winner-undo-counter))
@@ -455,7 +455,7 @@ In other words, \"undo\" changes in window configuration."
      (return t))                       ; .. then everything is fine.
     (t ;; Otherwise, discharge it (and try the next one).
      (ring-remove winner-pending-undo-ring winner-undo-counter)))))
+
 
 (defun winner-redo ()                  ; If you change your mind.
   "Restore a more recent window configuration saved by Winner mode."
@@ -474,8 +474,8 @@ In other words, \"undo\" changes in window configuration."
 
 (unless winner-mode-map
   (setq winner-mode-map (make-sparse-keymap))
-  (define-key winner-mode-map [(control x) left] 'winner-undo)
-  (define-key winner-mode-map [(control x) right] 'winner-redo))
+  (define-key winner-mode-map [(control c) left] 'winner-undo)
+  (define-key winner-mode-map [(control c) right] 'winner-redo))
 
 (unless (or (assq 'winner-mode minor-mode-map-alist)
            winner-dont-bind-my-keys)
@@ -484,4 +484,5 @@ In other words, \"undo\" changes in window configuration."
 
 (provide 'winner)
 
+;;; arch-tag: 686d1c1b-010e-42ca-a192-b5685112418f
 ;;; winner.el ends here