• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/

Lines Matching +defs:mode +defs:alist

30 ;; Winner mode is a global minor mode that records the changes in the
40 ;; Winner mode was improved August 1998.
81 (defcustom winner-mode nil
82 "Toggle Winner mode.
84 use either \\[customize] or the function `winner-mode'."
92 "If non-nil: Do not use `winner-mode-map' in Winner mode."
161 ;; The key in this alist is the frame.
162 (defvar winner-ring-alist nil)
166 (or (cdr (assq frame winner-ring-alist))
169 (push (cons frame ring) winner-ring-alist)
270 (defvar winner-point-alist nil)
277 (defun winner-make-point-alist ()
279 (loop with alist
282 (or (assq (window-buffer win) alist)
285 alist)))
288 finally return alist)))
291 ;; Consult (and possibly extend) `winner-point-alist'.
294 (let ((entry (assq buf winner-point-alist)))
306 winner-point-alist)
319 ;; Possibly update `winner-point-alist'
340 for entry = (cadr (assq buf winner-point-alist))
355 ;;;; Winner mode (a minor mode)
357 (defcustom winner-mode-hook nil
358 "Functions to run whenever Winner mode is turned on."
362 (defcustom winner-mode-leave-hook nil
363 "Functions to run whenever Winner mode is turned off."
367 (defvar winner-mode-map
372 "Keymap for Winner mode.")
386 (defun winner-mode (&optional arg)
387 "Toggle Winner mode.
388 With arg, turn Winner mode on if and only if arg is positive."
391 (not winner-mode))))
393 ;; Turn mode on
395 (setq winner-mode t)
404 (run-hooks 'winner-mode-hook)
405 (when (interactive-p) (message "Winner mode enabled")))
406 ;; Turn mode off
407 (winner-mode
408 (setq winner-mode nil)
413 (run-hooks 'winner-mode-leave-hook)
414 (when (interactive-p) (message "Winner mode disabled"))))))
426 "Switch back to an earlier window configuration saved by Winner mode.
430 ((not winner-mode) (error "Winner mode is turned off"))
435 (setq winner-point-alist (winner-make-point-alist))
470 "Restore a more recent window configuration saved by Winner mode."
484 (unless (or (assq 'winner-mode minor-mode-map-alist)
486 (push (cons 'winner-mode winner-mode-map)
487 minor-mode-map-alist))