* lisp/winner.el (winner-hook-installed-p): Remove.
(winner-mode): Simplify accordingly.
This commit is contained in:
parent
c43a861814
commit
9b2607e821
2 changed files with 5 additions and 15 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2013-07-22 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* 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*,
|
|||
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 '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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue