Mercurial > emacs
comparison lisp/calc/calc-incom.el @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 0d8b17d428b5 |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
1 ;;; calc-incom.el --- complex data type input functions for Calc | 1 ;;; calc-incom.el --- complex data type input functions for Calc |
2 | 2 |
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, |
4 ;; 2005 Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Author: David Gillespie <daveg@synaptics.com> | 6 ;; Author: David Gillespie <daveg@synaptics.com> |
6 ;; Maintainers: D. Goel <deego@gnufans.org> | 7 ;; Maintainer: Jay Belanger <belanger@truman.edu> |
7 ;; Colin Walters <walters@debian.org> | |
8 | 8 |
9 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
10 | 10 |
11 ;; GNU Emacs is distributed in the hope that it will be useful, | 11 ;; GNU Emacs is distributed in the hope that it will be useful, |
12 ;; but WITHOUT ANY WARRANTY. No author or distributor | 12 ;; but WITHOUT ANY WARRANTY. No author or distributor |
26 ;;; Commentary: | 26 ;;; Commentary: |
27 | 27 |
28 ;;; Code: | 28 ;;; Code: |
29 | 29 |
30 ;; This file is autoloaded from calc-ext.el. | 30 ;; This file is autoloaded from calc-ext.el. |
31 | |
31 (require 'calc-ext) | 32 (require 'calc-ext) |
32 | |
33 (require 'calc-macs) | 33 (require 'calc-macs) |
34 | |
35 (defun calc-Need-calc-incom () nil) | |
36 | |
37 | 34 |
38 ;;; Incomplete forms. | 35 ;;; Incomplete forms. |
39 | 36 |
40 (defun calc-begin-complex () | 37 (defun calc-begin-complex () |
41 (interactive) | 38 (interactive) |
170 (calc-pop-push num | 167 (calc-pop-push num |
171 (list 'incomplete 'vec | 168 (list 'incomplete 'vec |
172 (cons 'vec (append (cdr (cdr inc)) stuff))) | 169 (cons 'vec (append (cdr (cdr inc)) stuff))) |
173 (list 'incomplete 'vec)))))))) | 170 (list 'incomplete 'vec)))))))) |
174 | 171 |
172 ;; The following variables are initially declared in calc.el, | |
173 ;; but are used by calc-digit-dots. | |
174 (defvar calc-prev-char) | |
175 (defvar calc-prev-prev-char) | |
176 (defvar calc-digit-value) | |
177 | |
175 (defun calc-digit-dots () | 178 (defun calc-digit-dots () |
176 (if (eq calc-prev-char ?.) | 179 (if (eq calc-prev-char ?.) |
177 (progn | 180 (progn |
178 (delete-backward-char 1) | 181 (delete-backward-char 1) |
179 (if (calc-minibuffer-contains ".*\\.\\'") | 182 (if (calc-minibuffer-contains ".*\\.\\'") |
181 (setq calc-prev-char 'dots | 184 (setq calc-prev-char 'dots |
182 last-command-char 32) | 185 last-command-char 32) |
183 (if calc-prev-prev-char | 186 (if calc-prev-prev-char |
184 (calcDigit-nondigit) | 187 (calcDigit-nondigit) |
185 (setq calc-digit-value nil) | 188 (setq calc-digit-value nil) |
186 (erase-buffer) | 189 (let ((inhibit-read-only t)) |
190 (erase-buffer)) | |
187 (exit-minibuffer))) | 191 (exit-minibuffer))) |
188 ;; just ignore extra decimal point, anticipating ".." | 192 ;; just ignore extra decimal point, anticipating ".." |
189 (delete-backward-char 1))) | 193 (delete-backward-char 1))) |
190 | 194 |
191 (defun calc-dots () | 195 (defun calc-dots () |
224 (error "Vector is incomplete")) | 228 (error "Vector is incomplete")) |
225 ((eq (nth 1 a) 'intv) | 229 ((eq (nth 1 a) 'intv) |
226 (error "Interval form is incomplete")) | 230 (error "Interval form is incomplete")) |
227 (t (error "Object is incomplete")))) | 231 (t (error "Object is incomplete")))) |
228 | 232 |
233 (provide 'calc-incom) | |
234 | |
235 ;;; arch-tag: b8001270-4dc7-481b-a3e3-a952e19b390d | |
229 ;;; calc-incom.el ends here | 236 ;;; calc-incom.el ends here |