comparison lisp/winner.el @ 105372:bd2966850aac

Use `called-interactively-p' instead of `interactive-p'.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 02 Oct 2009 03:48:36 +0000
parents a9dc0e7c3f2b
children 1d1d5d9bd884
comparison
equal deleted inserted replaced
105371:0769a73f1d18 105372:bd2966850aac
385 (t (add-hook 'post-command-hook 'winner-save-conditionally))) 385 (t (add-hook 'post-command-hook 'winner-save-conditionally)))
386 (add-hook 'minibuffer-setup-hook 'winner-save-unconditionally) 386 (add-hook 'minibuffer-setup-hook 'winner-save-unconditionally)
387 (setq winner-modified-list (frame-list)) 387 (setq winner-modified-list (frame-list))
388 (winner-save-old-configurations) 388 (winner-save-old-configurations)
389 (run-hooks 'winner-mode-hook) 389 (run-hooks 'winner-mode-hook)
390 (when (interactive-p) (message "Winner mode enabled"))) 390 (when (called-interactively-p 'interactive)
391 (message "Winner mode enabled")))
391 ;; Turn mode off 392 ;; Turn mode off
392 (winner-mode 393 (winner-mode
393 (setq winner-mode nil) 394 (setq winner-mode nil)
394 (remove-hook 'window-configuration-change-hook 'winner-change-fun) 395 (remove-hook 'window-configuration-change-hook 'winner-change-fun)
395 (remove-hook 'post-command-hook 'winner-save-old-configurations) 396 (remove-hook 'post-command-hook 'winner-save-old-configurations)
396 (remove-hook 'post-command-hook 'winner-save-conditionally) 397 (remove-hook 'post-command-hook 'winner-save-conditionally)
397 (remove-hook 'minibuffer-setup-hook 'winner-save-unconditionally) 398 (remove-hook 'minibuffer-setup-hook 'winner-save-unconditionally)
398 (run-hooks 'winner-mode-leave-hook) 399 (run-hooks 'winner-mode-leave-hook)
399 (when (interactive-p) (message "Winner mode disabled")))))) 400 (when (called-interactively-p 'interactive)
401 (message "Winner mode disabled"))))))
400 402
401 ;; Inspired by undo (simple.el) 403 ;; Inspired by undo (simple.el)
402 404
403 (defvar winner-undo-frame nil) 405 (defvar winner-undo-frame nil)
404 406