Mercurial > emacs
comparison lisp/calc/calc.el @ 54583:4a88f2b2e26a
(calc-mode-map): Use mapc.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 26 Mar 2004 15:29:13 +0000 |
parents | 695cf19ef79e |
children | abc0e9beaacd |
comparison
equal
deleted
inserted
replaced
54582:91f663907945 | 54583:4a88f2b2e26a |
---|---|
1 ;;; calc.el --- the GNU Emacs calculator | 1 ;;; calc.el --- the GNU Emacs calculator |
2 | 2 |
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: David Gillespie <daveg@synaptics.com> | 5 ;; Author: David Gillespie <daveg@synaptics.com> |
6 ;; Maintainers: D. Goel <deego@gnufans.org> | 6 ;; Maintainers: D. Goel <deego@gnufans.org> |
7 ;; Colin Walters <walters@debian.org> | 7 ;; Colin Walters <walters@debian.org> |
8 ;; Keywords: convenience, extensions | 8 ;; Keywords: convenience, extensions |
731 (define-key map "\M-\t" 'calc-roll-up) | 731 (define-key map "\M-\t" 'calc-roll-up) |
732 (define-key map "\C-m" 'calc-enter) | 732 (define-key map "\C-m" 'calc-enter) |
733 (define-key map "\M-\C-m" 'calc-last-args-stub) | 733 (define-key map "\M-\C-m" 'calc-last-args-stub) |
734 (define-key map "\C-j" 'calc-over) | 734 (define-key map "\C-j" 'calc-over) |
735 | 735 |
736 (mapcar (lambda (x) (define-key map (char-to-string x) 'undefined)) | 736 (mapc (lambda (x) (define-key map (char-to-string x) 'undefined)) |
737 "lOW") | 737 "lOW") |
738 (mapcar (lambda (x) (define-key map (char-to-string x) 'calc-missing-key)) | 738 (mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key)) |
739 (concat "ABCDEFGHIJKLMNPQRSTUVXZabcdfghjkmoprstuvwxyz" | 739 (concat "ABCDEFGHIJKLMNPQRSTUVXZabcdfghjkmoprstuvwxyz" |
740 ":\\|!()[]<>{},;=~`\C-k\M-k\C-w\M-w\C-y\C-_")) | 740 ":\\|!()[]<>{},;=~`\C-k\M-k\C-w\M-w\C-y\C-_")) |
741 (mapcar (lambda (x) (define-key map (char-to-string x) 'calcDigit-start)) | 741 (mapc (lambda (x) (define-key map (char-to-string x) 'calcDigit-start)) |
742 "_0123456789.#@") | 742 "_0123456789.#@") |
743 map)) | 743 map)) |
744 | 744 |
745 (defvar calc-digit-map | 745 (defvar calc-digit-map |
746 (let ((map (make-keymap))) | 746 (let ((map (make-keymap))) |
747 (if calc-emacs-type-lucid | 747 (if calc-emacs-type-lucid |
2950 (when calc-language-output-filter | 2950 (when calc-language-output-filter |
2951 (setq s (funcall calc-language-output-filter s))) | 2951 (setq s (funcall calc-language-output-filter s))) |
2952 (if (eq calc-language 'big) | 2952 (if (eq calc-language 'big) |
2953 (setq s (concat s "\n")) | 2953 (setq s (concat s "\n")) |
2954 (when calc-line-numbering | 2954 (when calc-line-numbering |
2955 (aset s 0 ?1) | 2955 (setq s (concat "1:" (substring s 2))))) |
2956 (aset s 1 ?:))) | |
2957 (setcar (cdr entry) (calc-count-lines s)) | 2956 (setcar (cdr entry) (calc-count-lines s)) |
2958 s)) | 2957 s)) |
2959 | 2958 |
2960 (defun math-stack-value-offset (c) | 2959 (defun math-stack-value-offset (c) |
2961 (let* ((num (if calc-line-numbering 4 0)) | 2960 (let* ((num (if calc-line-numbering 4 0)) |