From 9b2607e821843c26fab866b2ebec7befef696c6b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Jul 2013 18:51:29 -0400 Subject: [PATCH] * lisp/winner.el (winner-hook-installed-p): Remove. (winner-mode): Simplify accordingly. --- lisp/ChangeLog | 3 +++ lisp/winner.el | 17 ++--------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38c79fc4279..7e104ad69b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-07-22 Stefan Monnier + * winner.el (winner-hook-installed-p): Remove. + (winner-mode): Simplify accordingly. + * subr.el (add-to-list): Fix compiler-macro when `append' is not constant. Don't use `cl-member' for the base case. diff --git a/lisp/winner.el b/lisp/winner.el index f521ba0521b..e7e7d0614b4 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -342,31 +342,18 @@ You may want to include buffer names such as *Help*, *Apropos*, map) "Keymap for Winner mode.") -;; Check if `window-configuration-change-hook' is working. -(defun winner-hook-installed-p () - (save-window-excursion - (let ((winner-var nil) - (window-configuration-change-hook - '((lambda () (setq winner-var t))))) - (split-window) - winner-var))) - ;;;###autoload (define-minor-mode winner-mode nil :global t ; let d-m-m make the doc (if winner-mode (progn - (if (winner-hook-installed-p) - (progn - (add-hook 'window-configuration-change-hook 'winner-change-fun) - (add-hook 'post-command-hook 'winner-save-old-configurations)) - (add-hook 'post-command-hook 'winner-save-conditionally)) + (add-hook 'window-configuration-change-hook 'winner-change-fun) + (add-hook 'post-command-hook 'winner-save-old-configurations) (add-hook 'minibuffer-setup-hook 'winner-save-unconditionally) (setq winner-modified-list (frame-list)) (winner-save-old-configurations)) (remove-hook 'window-configuration-change-hook 'winner-change-fun) (remove-hook 'post-command-hook 'winner-save-old-configurations) - (remove-hook 'post-command-hook 'winner-save-conditionally) (remove-hook 'minibuffer-setup-hook 'winner-save-unconditionally))) ;; Inspired by undo (simple.el) -- 2.39.2