• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:global +defs:mode

38 ;;   (global-set-key [(control return)] 'calculator)
65 (defcustom calculator-electric-mode nil
67 Electric mode saves some place but changes the way you interact with the
93 for `calculator-mode'."
105 (defcustom calculator-radix-grouping-mode t
106 "*Use digit grouping in radix output mode.
109 output mode is active (determined by `calculator-output-radix')."
115 See `calculator-radix-grouping-mode'."
121 See `calculator-radix-grouping-mode'."
190 (defcustom calculator-mode-hook nil
191 "*List of hook functions for `calculator-mode' to run.
192 Note: if `calculator-electric-mode' is on, then this hook will get
309 versions), `DX' (converted to radians if degrees mode is on), `D'
310 (function for converting radians to degrees if deg mode is on), `L'
344 "The mode for display, one of: nil (decimal), 'bin, 'oct or 'hex.")
347 "The mode for input, one of: nil (decimal), 'bin, 'oct or 'hex.")
381 (defvar calculator-saved-global-map nil
382 "Saved global key map.")
384 (defvar calculator-restart-other-mode nil
385 "Used to hack restarting with the electric mode changed.")
390 (defvar calculator-mode-map nil
393 (or calculator-mode-map
409 (calculator-dec/deg-mode "D")
412 (calculator-radix-mode "H" "X" "O" "B")
413 (calculator-radix-input-mode "id" "ih" "ix" "io" "ib"
415 (calculator-radix-output-mode "od" "oh" "ox" "oo" "ob"
449 ;; make C-h work in text-mode
456 (calculator-radix-mode ,(nth 2 x))
464 (calculator-radix-input-mode ,(nth 2 x))
470 (calculator-radix-output-mode ,(nth 2 x))
491 ["Electric mode"
493 (setq calculator-restart-other-mode t)
498 :active (not calculator-electric-mode)]
499 ["Normal mode"
500 (progn (setq calculator-restart-other-mode t)
502 :active calculator-electric-mode]
545 (calculator-radix-mode "D"))
546 (and calculator-deg (calculator-dec/deg-mode)))
555 (calculator-radix-mode "D"))
556 (or calculator-deg (calculator-dec/deg-mode)))
580 (setq calculator-mode-map map)))
583 ;;; Startup and mode stuff
585 (defun calculator-mode ()
598 except when using a non-decimal radix mode for input (in this case `e'
630 Another toggle-able mode is for using degrees instead of radians for
633 * `D' switch to all-decimal mode, or toggle degrees/radians
636 insensitive) sets only the input or display radix mode
638 * \"D=\": degrees mode;
646 they handle such). If output is using any radix mode, then these keys
647 toggle digit grouping mode and the chunk size.
671 * `calculator-electric-mode' use only the echo-area electrically.
678 \\{calculator-mode-map}"
681 (setq major-mode 'calculator-mode)
682 (setq mode-name "Calculator")
683 (use-local-map calculator-mode-map)
684 (run-mode-hooks 'calculator-mode-hook))
691 See the documentation for `calculator-mode' for more information."
693 (if calculator-restart-other-mode
694 (setq calculator-electric-mode (not calculator-electric-mode)))
702 (if calculator-electric-mode
712 (setq old-g-map (current-global-map))
713 (setq calculator-saved-global-map (current-global-map))
715 (use-global-map calculator-mode-map)
716 (run-hooks 'calculator-mode-hook)
728 (use-global-map old-g-map))))
778 (calculator-mode)
782 (if (and calculator-restart-other-mode calculator-electric-mode)
786 "Same as `message', but special handle of electric mode."
788 (if calculator-electric-mode
818 (lookup-key calculator-mode-map
822 calculator-mode-map (substring key 0 (1+ i)) nil)
824 (define-key calculator-mode-map key 'calculator-op)))
839 (or calculator-restart-other-mode
844 (setq calculator-restart-other-mode nil)
938 If radix output mode is active, toggle digit grouping."
942 (setq calculator-radix-grouping-mode
943 (not calculator-radix-grouping-mode))
945 "Digit grouping mode %s."
946 (if calculator-radix-grouping-mode "ON" "OFF")))
965 If radix output mode is active, toggle digit grouping."
973 If radix output mode is active, increase the grouping size."
990 If radix output mode is active, decrease the grouping size."
1123 (if calculator-radix-grouping-mode
1392 "Enter an `E' exponent character, or a digit in hex input mode."
1477 (defun calculator-dec/deg-mode ()
1478 "Set decimal mode for display & input, if decimal, toggle deg mode."
1487 ;; already decimal - toggle degrees mode
1491 (defun calculator-radix-mode (&optional keys)
1495 (calculator-radix-input-mode keys)
1496 (calculator-radix-output-mode keys))
1498 (defun calculator-radix-input-mode (&optional keys)
1512 (defun calculator-radix-output-mode (&optional keys)
1695 * D - switch to all-decimal, or toggle deg/rad mode
1696 * B/O/H/X - binary/octal/hex mode for i/o (X is a shortcut for H)
1707 (let ((mode-name "Calculator")
1708 (major-mode 'calculator-mode)
1709 (g-map (current-global-map))
1712 (if calculator-electric-mode
1713 (use-global-map calculator-saved-global-map))
1714 (if (or (not calculator-electric-mode)
1715 ;; XEmacs has a problem with electric-describe-mode
1717 (describe-mode)
1718 (electric-describe-mode))
1719 (if calculator-electric-mode
1720 (use-global-map g-map))
1744 (if (not calculator-electric-mode)
1753 (if calculator-electric-mode (throw 'calculator-done nil)))