[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-vec.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-vec.el [emacs-unicode-2] |
Date: |
Wed, 08 Dec 2004 01:05:02 -0500 |
Index: emacs/lisp/calc/calc-vec.el
diff -c emacs/lisp/calc/calc-vec.el:1.5.4.2 emacs/lisp/calc/calc-vec.el:1.5.4.3
*** emacs/lisp/calc/calc-vec.el:1.5.4.2 Fri Nov 12 02:53:01 2004
--- emacs/lisp/calc/calc-vec.el Wed Dec 8 05:02:18 2004
***************
*** 3,10 ****
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
;; Author: David Gillespie <address@hidden>
! ;; Maintainers: D. Goel <address@hidden>
! ;; Colin Walters <address@hidden>
;; This file is part of GNU Emacs.
--- 3,9 ----
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
;; Author: David Gillespie <address@hidden>
! ;; Maintainer: Jay Belanger <address@hidden>
;; This file is part of GNU Emacs.
***************
*** 28,40 ****
;;; Code:
;; This file is autoloaded from calc-ext.el.
- (require 'calc-ext)
(require 'calc-macs)
- (defun calc-Need-calc-vec () nil)
-
-
(defun calc-display-strings (n)
(interactive "P")
(calc-wrapper
--- 27,36 ----
;;; Code:
;; This file is autoloaded from calc-ext.el.
+ (require 'calc-ext)
(require 'calc-macs)
(defun calc-display-strings (n)
(interactive "P")
(calc-wrapper
***************
*** 1101,1121 ****
(cons 'vec (nreverse (sort (copy-sequence (cdr vec)) 'math-beforep)))
(math-reject-arg vec 'vectorp)))
! (defun calcFunc-grade (grade-vec)
! (if (math-vectorp grade-vec)
! (let* ((len (1- (length grade-vec))))
(cons 'vec (sort (cdr (calcFunc-index len)) 'math-grade-beforep)))
! (math-reject-arg grade-vec 'vectorp)))
! (defun calcFunc-rgrade (grade-vec)
! (if (math-vectorp grade-vec)
! (let* ((len (1- (length grade-vec))))
(cons 'vec (nreverse (sort (cdr (calcFunc-index len))
'math-grade-beforep))))
! (math-reject-arg grade-vec 'vectorp)))
(defun math-grade-beforep (i j)
! (math-beforep (nth i grade-vec) (nth j grade-vec)))
;;; Compile a histogram of data from a vector.
--- 1097,1122 ----
(cons 'vec (nreverse (sort (copy-sequence (cdr vec)) 'math-beforep)))
(math-reject-arg vec 'vectorp)))
! ;; The variable math-grade-vec is local to calcFunc-grade and
! ;; calcFunc-rgrade, but is used by math-grade-beforep, which is called
! ;; by calcFunc-grade and calcFunc-rgrade.
! (defvar math-grade-vec)
!
! (defun calcFunc-grade (math-grade-vec)
! (if (math-vectorp math-grade-vec)
! (let* ((len (1- (length math-grade-vec))))
(cons 'vec (sort (cdr (calcFunc-index len)) 'math-grade-beforep)))
! (math-reject-arg math-grade-vec 'vectorp)))
! (defun calcFunc-rgrade (math-grade-vec)
! (if (math-vectorp math-grade-vec)
! (let* ((len (1- (length math-grade-vec))))
(cons 'vec (nreverse (sort (cdr (calcFunc-index len))
'math-grade-beforep))))
! (math-reject-arg math-grade-vec 'vectorp)))
(defun math-grade-beforep (i j)
! (math-beforep (nth i math-grade-vec) (nth j math-grade-vec)))
;;; Compile a histogram of data from a vector.
***************
*** 1461,1474 ****
!
! (defun math-read-brackets (space-sep close)
(and space-sep (setq space-sep (not (math-check-for-commas))))
(math-read-token)
(while (eq math-exp-token 'space)
(math-read-token))
! (if (or (equal math-expr-data close)
(eq math-exp-token 'end))
(progn
(math-read-token)
--- 1462,1487 ----
+ ;; The variable math-rb-close is local to math-read-brackets, but
+ ;; is used by math-read-vector, which is called (directly and
+ ;; indirectly) by math-read-brackets.
+ (defvar math-rb-close)
+
+ ;; The next few variables are local to math-read-exprs in calc-aent.el
+ ;; and math-read-expr in calc-ext.el, but are set in functions they call.
+ (defvar math-exp-pos)
+ (defvar math-exp-str)
+ (defvar math-exp-old-pos)
+ (defvar math-exp-token)
+ (defvar math-exp-keep-spaces)
+ (defvar math-expr-data)
! (defun math-read-brackets (space-sep math-rb-close)
(and space-sep (setq space-sep (not (math-check-for-commas))))
(math-read-token)
(while (eq math-exp-token 'space)
(math-read-token))
! (if (or (equal math-expr-data math-rb-close)
(eq math-exp-token 'end))
(progn
(math-read-token)
***************
*** 1495,1501 ****
(setq vals2 (catch 'syntax (math-read-vector))))
(if (and (not (stringp vals2))
(or (assoc math-expr-data '(("\\ldots") ("\\dots")
(";")))
! (equal math-expr-data close)
(eq math-exp-token 'end)))
(setq space-sep nil
vals vals2)
--- 1508,1514 ----
(setq vals2 (catch 'syntax (math-read-vector))))
(if (and (not (stringp vals2))
(or (assoc math-expr-data '(("\\ldots") ("\\dots")
(";")))
! (equal math-expr-data math-rb-close)
(eq math-exp-token 'end)))
(setq space-sep nil
vals vals2)
***************
*** 1509,1515 ****
(math-read-token)
(setq vals (if (> (length vals) 2)
(cons 'calcFunc-mul (cdr vals)) (nth 1 vals)))
! (let ((exp2 (if (or (equal math-expr-data close)
(equal math-expr-data ")")
(eq math-exp-token 'end))
'(var inf var-inf)
--- 1522,1528 ----
(math-read-token)
(setq vals (if (> (length vals) 2)
(cons 'calcFunc-mul (cdr vals)) (nth 1 vals)))
! (let ((exp2 (if (or (equal math-expr-data math-rb-close)
(equal math-expr-data ")")
(eq math-exp-token 'end))
'(var inf var-inf)
***************
*** 1519,1532 ****
(if (equal math-expr-data ")") 2 3)
vals
exp2)))
! (if (not (or (equal math-expr-data close)
(equal math-expr-data ")")
(eq math-exp-token 'end)))
(throw 'syntax "Expected `]'")))
(if (equal math-expr-data ";")
(let ((math-exp-keep-spaces space-sep))
(setq vals (cons 'vec (math-read-matrix (list vals))))))
! (if (not (or (equal math-expr-data close)
(eq math-exp-token 'end)))
(throw 'syntax "Expected `]'")))
(or (eq math-exp-token 'end)
--- 1532,1545 ----
(if (equal math-expr-data ")") 2 3)
vals
exp2)))
! (if (not (or (equal math-expr-data math-rb-close)
(equal math-expr-data ")")
(eq math-exp-token 'end)))
(throw 'syntax "Expected `]'")))
(if (equal math-expr-data ";")
(let ((math-exp-keep-spaces space-sep))
(setq vals (cons 'vec (math-read-matrix (list vals))))))
! (if (not (or (equal math-expr-data math-rb-close)
(eq math-exp-token 'end)))
(throw 'syntax "Expected `]'")))
(or (eq math-exp-token 'end)
***************
*** 1557,1563 ****
(math-read-token))
(and (not (eq math-exp-token 'end))
(not (equal math-expr-data ";"))
! (not (equal math-expr-data close))
(not (equal math-expr-data "\\dots"))
(not (equal math-expr-data "\\ldots"))))
(if (equal math-expr-data ",")
--- 1570,1576 ----
(math-read-token))
(and (not (eq math-exp-token 'end))
(not (equal math-expr-data ";"))
! (not (equal math-expr-data math-rb-close))
(not (equal math-expr-data "\\dots"))
(not (equal math-expr-data "\\ldots"))))
(if (equal math-expr-data ",")
***************
*** 1577,1581 ****
--- 1590,1596 ----
(setq mat (nconc mat (list (math-read-vector)))))
mat)
+ (provide 'calc-vec)
+
;;; arch-tag: 7902a7af-ec69-440a-8635-ebb4db263402
;;; calc-vec.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-vec.el [emacs-unicode-2],
Miles Bader <=