comparison lisp/emulators/teco.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents ec9a17fef872
children b9518feda344
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
1 ;;; teco.el --- Teco interpreter for Gnu Emacs, version 1. 1 ;;; teco.el --- Teco interpreter for Gnu Emacs, version 1.
2 2
3 ;; Author: Dale R. Worley. 3 (require 'backquote)
4 ;; Keywords: emulators
5
6 ;; This file is part of XEmacs.
7
8 ;; XEmacs is free software; you can redistribute it and/or modify it
9 ;; under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 2, or (at your option)
11 ;; any later version.
12
13 ;; XEmacs is distributed in the hope that it will be useful, but
14 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ;; General Public License for more details.
17
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with XEmacs; see the file COPYING. If not, write to the Free
20 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 ;; 02111-1307, USA.
22
23 ;;; Synched up with: Not in FSF
24
25 ;;; Commentary:
26
27 ;; This code has been tested some, but no doubt contains a zillion bugs. 4 ;; This code has been tested some, but no doubt contains a zillion bugs.
28 ;; You have been warned. 5 ;; You have been warned.
29 6
30 ;; Written by Dale R. Worley based on a C implementation by Matt Fichtenbaum. 7 ;; Written by Dale R. Worley based on a C implementation by Matt Fichtenbaum.
31 ;; Please send comments, bug fixes, enhancements, etc. to drw@math.mit.edu. 8 ;; Please send comments, bug fixes, enhancements, etc. to drw@math.mit.edu.
184 ;; :]q Test whether stack is empty and return value 161 ;; :]q Test whether stack is empty and return value
185 ;; ` Not a Teco command 162 ;; ` Not a Teco command
186 ;; a-z Treated the same as A-Z 163 ;; a-z Treated the same as A-Z
187 ;; { Not a Teco command 164 ;; { Not a Teco command
188 ;; | Conditional 'else' 165 ;; | Conditional 'else'
189 ;; } Not a Teco command 166 ;; } Not a Teco comand
190 ;; ~ Not a Teco command 167 ;; ~ Not a Teco command
191 ;; DEL Delete last character typed in 168 ;; DEL Delete last character typed in
192 169
193 170
194 ;;; Code:
195 (require 'backquote)
196
197 ;; set a range of elements of an array to a value 171 ;; set a range of elements of an array to a value
198 (defun teco-set-elements (array start end value) 172 (defun teco-set-elements (array start end value)
199 (let ((i start)) 173 (let ((i start))
200 (while (<= i end) 174 (while (<= i end)
201 (aset array i value) 175 (aset array i value)
219 193
220 (defvar teco-digit-switch nil 194 (defvar teco-digit-switch nil
221 "Set if we have just executed a digit.") 195 "Set if we have just executed a digit.")
222 196
223 (defvar teco-exp-exp nil 197 (defvar teco-exp-exp nil
224 "Expression value preceding operator.") 198 "Expression value preceeding operator.")
225 199
226 (defvar teco-exp-val1 nil 200 (defvar teco-exp-val1 nil
227 "Current argument value.") 201 "Current argument value.")
228 202
229 (defvar teco-exp-val2 nil 203 (defvar teco-exp-val2 nil