Commit 9b2607e8 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/winner.el (winner-hook-installed-p): Remove.

(winner-mode): Simplify accordingly.
parent c43a8618
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.
......@@ -342,31 +342,18 @@ You may want to include buffer names such as *Help*, *Apropos*,
"Keymap for Winner mode.")
;; Check if `window-configuration-change-hook' is working.
(defun winner-hook-installed-p ()
(let ((winner-var nil)
'((lambda () (setq winner-var t)))))
(define-minor-mode winner-mode nil :global t ; let d-m-m make the doc
(if winner-mode
(if (winner-hook-installed-p)
(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 'post-command-hook 'winner-save-old-configurations)
(add-hook 'minibuffer-setup-hook 'winner-save-unconditionally)
(setq winner-modified-list (frame-list))
(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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment