[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/winner.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/winner.el |
Date: |
Wed, 13 Jul 2005 07:03:21 -0400 |
Index: emacs/lisp/winner.el
diff -c emacs/lisp/winner.el:1.28 emacs/lisp/winner.el:1.29
*** emacs/lisp/winner.el:1.28 Mon Jul 4 23:09:00 2005
--- emacs/lisp/winner.el Wed Jul 13 11:03:18 2005
***************
*** 78,84 ****
;;;###autoload
(defcustom winner-mode nil
! "Toggle winner-mode.
Setting this variable directly does not take effect;
use either \\[customize] or the function `winner-mode'."
:set #'(lambda (symbol value) (funcall symbol (or value 0)))
--- 78,84 ----
;;;###autoload
(defcustom winner-mode nil
! "Toggle Winner mode.
Setting this variable directly does not take effect;
use either \\[customize] or the function `winner-mode'."
:set #'(lambda (symbol value) (funcall symbol (or value 0)))
***************
*** 98,105 ****
:group 'winner)
(defcustom winner-boring-buffers '("*Completions*")
! "`winner-undo' will not restore windows displaying any of these \
! buffers.
You may want to include buffer names such as *Help*, *Apropos*,
*Buffer List*, *info* and *Compile-Log*."
:type '(repeat string)
--- 98,104 ----
:group 'winner)
(defcustom winner-boring-buffers '("*Completions*")
! "`winner-undo' will not restore windows displaying any of these buffers.
You may want to include buffer names such as *Help*, *Apropos*,
*Buffer List*, *info* and *Compile-Log*."
:type '(repeat string)
***************
*** 108,114 ****
! ;;;; Saving old configurations (internal variables and subroutines)
;;; Current configuration
--- 107,114 ----
!
! ;;;; Saving old configurations (internal variables and subroutines)
;;; Current configuration
***************
*** 162,174 ****
;; Find the right ring. If it does not exist, create one.
(defsubst winner-ring (frame)
(or (cdr (assq frame winner-ring-alist))
! (progn
! (let ((ring (make-ring winner-ring-size)))
! (ring-insert ring (winner-configuration frame))
! (push (cons frame ring) winner-ring-alist)
! ring))))
! ;; If the same command is called several times in a row,
;; we only save one window configuration.
(defvar winner-last-command nil)
--- 162,174 ----
;; Find the right ring. If it does not exist, create one.
(defsubst winner-ring (frame)
(or (cdr (assq frame winner-ring-alist))
! (let ((ring (make-ring winner-ring-size)))
! (ring-insert ring (winner-configuration frame))
! (push (cons frame ring) winner-ring-alist)
! ring)))
!
! ;; If the same command is called several times in a row,
;; we only save one window configuration.
(defvar winner-last-command nil)
***************
*** 176,182 ****
(defvar winner-last-frames nil)
! (defun winner-equal (a b)
"Check whether two Winner configurations (as produced by
`winner-conf') are equal."
(equal (cdr a) (cdr b)))
--- 176,182 ----
(defvar winner-last-frames nil)
! (defsubst winner-equal (a b)
"Check whether two Winner configurations (as produced by
`winner-conf') are equal."
(equal (cdr a) (cdr b)))
***************
*** 240,246 ****
! ;;;; Restoring configurations
;; Works almost as `set-window-configuration',
;; but does not change the contents or the size of the minibuffer,
--- 240,247 ----
!
! ;;;; Restoring configurations
;; Works almost as `set-window-configuration',
;; but does not change the contents or the size of the minibuffer,
***************
*** 301,307 ****
winner-point-alist)
(point)))))))
! ;; 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
;; should be deleted. Preserve correct points and marks.
--- 302,309 ----
winner-point-alist)
(point)))))))
!
! ;; 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
;; should be deleted. Preserve correct points and marks.
***************
*** 410,416 ****
(defvar winner-undo-frame nil)
(defvar winner-pending-undo-ring nil
! "The ring currently used by winner undo.")
(defvar winner-undo-counter nil)
(defvar winner-undone-data nil) ; There confs have been passed.
--- 412,418 ----
(defvar winner-undo-frame nil)
(defvar winner-pending-undo-ring nil
! "The ring currently used by `winner-undo'.")
(defvar winner-undo-counter nil)
(defvar winner-undone-data nil) ; There confs have been passed.
***************
*** 437,443 ****
! (defun winner-undo-this () ; The heart of winner undo.
(loop
(cond
((>= winner-undo-counter (ring-length winner-pending-undo-ring))
--- 439,446 ----
!
! (defun winner-undo-this () ; The heart of winner undo.
(loop
(cond
((>= winner-undo-counter (ring-length winner-pending-undo-ring))
***************
*** 467,473 ****
(ring-ref winner-pending-undo-ring 0)))
(unless (eq (selected-window) (minibuffer-window))
(message "Winner undid undo")))
! (t (error "Previous command was not a winner-undo"))))
;;; To be evaluated when the package is loaded:
--- 470,476 ----
(ring-ref winner-pending-undo-ring 0)))
(unless (eq (selected-window) (minibuffer-window))
(message "Winner undid undo")))
! (t (error "Previous command was not a `winner-undo'"))))
;;; To be evaluated when the package is loaded: