[comp.emacs] Patch for GNU Emacs Calc, version 1.02 -> 1.03

daveg@cit-vax.Caltech.Edu (David Gillespie) (06/27/90)

The following patches convert Calc version 1.02 into Calc
version 1.03.  To apply them automatically with Patch v2.0,
first cd into your Calc distribution directory, then execute
"patch -p0 <calc.patch", where "calc.patch" is the name of this file.
You will want to re-byte-compile both parts, and re-format the
manual, as explained in the INSTALL file.

These patches do not cover the README and INSTALL files.  The
INSTALL file is just a copy of the "Installation" chapter of
calc.texinfo, which is updated by this patch.  Note that some
patches will add to the list of "autoload" commands recommended
in that chapter.

Patches and complete tar files are also available from anonymous FTP
on csvax.caltech.edu, in the "pub" subdirectory.

Enjoy!
							-- Dave

Dave Gillespie
256-80 Caltech, Pasadena CA 91125
daveg@csvax.caltech.edu, ...!cit-vax!daveg



*** calc.el	Tue Jun 26 16:33:01 1990
--- ../dist/calc.el	Tue Jun 26 17:02:14 1990
***************
*** 1,4 ****
! ;; Calculator for GNU Emacs version 1.02
  ;; Copyright (C) 1990 Dave Gillespie
  
  ;; This file is part of GNU Emacs.
--- 1,4 ----
! ;; Calculator for GNU Emacs version 1.03
  ;; Copyright (C) 1990 Dave Gillespie
  
  ;; This file is part of GNU Emacs.
***************
*** 23,39 ****
  ;;; commands only.  Assuming the autoload commands shown below have been
  ;;; done, the Calculator will autoload the remaining commands from calc-ext.elc
  ;;; whenever one is first needed.  If you wish, you can concatenate calc-ext
! ;;; onto the end of calc (.el or .elc) to make one big file.
  
  ;;; Suggested usage:
  ;;;
  ;;;   (autoload 'calc ".../calc.elc" "Calculator Mode" t nil)
  ;;;   (autoload 'quick-calc ".../calc.elc" "Quick Calculator" t nil)
  ;;;   (autoload 'calc-grab-region ".../calc-ext.elc" nil t nil)
  ;;;   (autoload 'defmath ".../calc-ext.elc" nil t t)
  ;;;   (autoload 'calc-extensions ".../calc-ext.elc" nil nil nil)
  ;;;   (global-set-key "\e#" 'calc)
! ;;;   M-x calc
  ;;;
  ;;; where ".../calc.elc" represents the full path for "calc.elc",
  ;;; and ".../calc-ext.elc" is the path of the companion file containing
--- 23,41 ----
  ;;; commands only.  Assuming the autoload commands shown below have been
  ;;; done, the Calculator will autoload the remaining commands from calc-ext.elc
  ;;; whenever one is first needed.  If you wish, you can concatenate calc-ext
! ;;; onto the end of calc to make one big file (.el or .elc).
  
  ;;; Suggested usage:
  ;;;
  ;;;   (autoload 'calc ".../calc.elc" "Calculator Mode" t nil)
  ;;;   (autoload 'quick-calc ".../calc.elc" "Quick Calculator" t nil)
+ ;;;   (autoload 'full-calc ".../calc.elc" "Full-screen Calculator" t nil)
+ ;;;   (autoload 'calc-eval ".../calc.elc" "Call Calculator" nil nil)
  ;;;   (autoload 'calc-grab-region ".../calc-ext.elc" nil t nil)
  ;;;   (autoload 'defmath ".../calc-ext.elc" nil t t)
  ;;;   (autoload 'calc-extensions ".../calc-ext.elc" nil nil nil)
  ;;;   (global-set-key "\e#" 'calc)
! ;;;   `M-x calc' or `M-#' to start.
  ;;;
  ;;; where ".../calc.elc" represents the full path for "calc.elc",
  ;;; and ".../calc-ext.elc" is the path of the companion file containing
***************
*** 45,58 ****
  ;;;   daveg@csvax.caltech.edu, ...!cit-vax!daveg.
  ;;;
  ;;; This file and the manual, calc.texinfo, are available from anonymous FTP
! ;;; on csvax.caltech.edu [192.12.18.1]; look in ~ftp/pub/calc.
  ;;;
  ;;; Bug reports and suggestions are always welcome!
  
  
  ;;; All functions, macros, and Lisp variables defined here begin with one
! ;;; of the prefixes "math", "Math", or "calc", with the exception of
! ;;; "another-calc".  User-accessible variables begin with "var-".
  
  
  
--- 47,61 ----
  ;;;   daveg@csvax.caltech.edu, ...!cit-vax!daveg.
  ;;;
  ;;; This file and the manual, calc.texinfo, are available from anonymous FTP
! ;;; on csvax.caltech.edu [192.12.18.1]; look in ~ftp/pub/calc*.
  ;;;
  ;;; Bug reports and suggestions are always welcome!
  
  
  ;;; All functions, macros, and Lisp variables defined here begin with one
! ;;; of the prefixes "math", "Math", or "calc", with the exceptions of
! ;;; "full-calc", "another-calc", "quick-calc", "report-calc-bug",
! ;;; and "defmath".  User-accessible variables begin with "var-".
  
  
  
***************
*** 60,66 ****
  
  (defmacro calc-record-compilation-date-macro ()
    (` (setq calc-version (concat "Emacs Calc Mode"
! 				" v1.02 by Dave Gillespie"
  				", installed "
  				(, (current-time-string))
  				" by "
--- 63,69 ----
  
  (defmacro calc-record-compilation-date-macro ()
    (` (setq calc-version (concat "Emacs Calc Mode"
! 				" v1.03 by Dave Gillespie"
  				", installed "
  				(, (current-time-string))
  				" by "
***************
*** 143,148 ****
--- 146,152 ----
  ;;;
  ;;;   Tim suggests adding spreadsheet-like features.
  ;;;   How about ultra-low-resolution plots?  (Probably too slow.)
+ ;;;   How about running gnuplot to generate high-res plots?
  ;;;   Implement language modes for Lisp, Ada, ...?
  ;;;
  
***************
*** 794,811 ****
  	   (calc-dollar-values calc-quick-prev-results)
  	   (calc-dollar-used 0)
  	   (enable-recursive-minibuffers t)
! 	   (alg-exp (calc-do-alg-entry "" "Quick calc: ")))
!       (let ((buf ""))
! 	(setq calc-quick-prev-results alg-exp)
! 	(while alg-exp
  	  (setq buf (concat buf
  			    (if calc-extensions-loaded
! 				(math-format-value (car alg-exp) 1000)
! 			      (math-format-flat-expr (car alg-exp) 0))
! 			    " ")
! 		alg-exp (cdr alg-exp)))
! 	(calc-handle-whys)
! 	(message buf))))
  )
  
  (defun calc-summary (&optional full)
--- 798,841 ----
  	   (calc-dollar-values calc-quick-prev-results)
  	   (calc-dollar-used 0)
  	   (enable-recursive-minibuffers t)
! 	   (alg-exp (calc-do-alg-entry "" "Quick calc: "))
! 	   buf)
!       (setq calc-quick-prev-results alg-exp)
!       (while alg-exp
! 	(setq buf (concat buf
! 			  (and buf " ")
! 			  (if calc-extensions-loaded
! 			      (math-format-value (car alg-exp) 1000)
! 			    (math-format-flat-expr (car alg-exp) 0)))
! 	      alg-exp (cdr alg-exp)))
!       (calc-handle-whys)
!       (message buf)))
! )
! 
! (defun calc-eval (str &optional separator &rest args)
!   "Do a quick calculation and return the result as a string.
! Return value will either be the formatted result in string form,
! or a list containing a character position and an error message in string form."
!   (save-excursion
!     (calc-create-buffer)
!     (let* ((calc-command-flags nil)
! 	   (calc-language (if (memq calc-language '(nil big))
! 			      'flat calc-language))
! 	   (calc-dollar-values args)
! 	   (calc-dollar-used 0)
! 	   (res (math-read-exprs str))
! 	   buf)
!       (if (eq (car res) 'error)
! 	  (cdr res)
! 	(setq res (mapcar 'calc-normalize res))
! 	(while res
  	  (setq buf (concat buf
+ 			    (and buf (or separator ", "))
  			    (if calc-extensions-loaded
! 				(math-format-value (car res) 1000)
! 			      (math-format-flat-expr (car res) 0)))
! 		res (cdr res)))
! 	buf)))
  )
  
  (defun calc-summary (&optional full)
***************
*** 2598,2604 ****
  
  
  ;;; Build a normalized fraction.  [R I I]
! ;;; (This could probably be implemented more efficiently than using the
  ;;;  the plain gcd algorithm.)
  (defun math-make-frac (num den)
    (if (Math-integer-negp den)
--- 2628,2634 ----
  
  
  ;;; Build a normalized fraction.  [R I I]
! ;;; (This could probably be implemented more efficiently than using
  ;;;  the plain gcd algorithm.)
  (defun math-make-frac (num den)
    (if (Math-integer-negp den)
***************
*** 3802,3808 ****
  		   exp-data (math-restore-dashes
  			     (math-match-substring exp-str 0))))
  	    ((or (and (>= ch ?0) (<= ch ?9))
! 		 (memq ch '(?\. ?_)))
  	     (or (and (eq calc-language 'c)
  		      (string-match "0[xX][0-9a-fA-F]+" exp-str exp-pos))
  		 (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\([0-9]+\\(#\\|\\^\\^\\)[0-9a-zA-Z:]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" exp-str exp-pos))
--- 3832,3842 ----
  		   exp-data (math-restore-dashes
  			     (math-match-substring exp-str 0))))
  	    ((or (and (>= ch ?0) (<= ch ?9))
! 		 (eq ch '?\.)
! 		 (and (eq ch '?_)
! 		      (or (not (eq calc-language 'tex))
! 			  (eq exp-pos 0)
! 			  (memq (elt exp-str (1- exp-pos)) '(32 ?\()))))
  	     (or (and (eq calc-language 'c)
  		      (string-match "0[xX][0-9a-fA-F]+" exp-str exp-pos))
  		 (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\([0-9]+\\(#\\|\\^\\^\\)[0-9a-zA-Z:]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" exp-str exp-pos))
***************
*** 4072,4078 ****
    (interactive "sBug Subject: ")
    (mail nil calc-bug-address topic)
    (goto-char (point-max))
!   (insert "\nIn Calc 1.02, Emacs " (emacs-version) "\n\n")
    (message (substitute-command-keys "Type \\[mail-send] to send bug report."))
  )
  
--- 4106,4112 ----
    (interactive "sBug Subject: ")
    (mail nil calc-bug-address topic)
    (goto-char (point-max))
!   (insert "\nIn Calc 1.03, Emacs " (emacs-version) "\n\n")
    (message (substitute-command-keys "Type \\[mail-send] to send bug report."))
  )
  
*** calc-ext.el	Wed Jun 13 11:27:16 1990
--- ../dist/calc-ext.el	Tue Jun 26 17:02:21 1990
***************
*** 1,4 ****
! ;; Calculator for GNU Emacs, part II
  ;; Copyright (C) 1990 Dave Gillespie
  
  ;; This file is part of GNU Emacs.
--- 1,4 ----
! ;; Calculator for GNU Emacs version 1.03, part II
  ;; Copyright (C) 1990 Dave Gillespie
  
  ;; This file is part of GNU Emacs.
***************
*** 1454,1466 ****
     (t s))
  )
  
! (defun calc-grab-region (top bot)
    "Parse the region as a matrix of numbers and push it on the Calculator stack.
  This is intended to be used in a non-Calculator buffer!
  If the start and the end of the region are in column zero, the contained lines
  are parsed into rows of the matrix.  Otherwise, point and mark define a
! rectangle which is parsed into a matrix."
!   (interactive "r")
    (and (memq major-mode '(calc-mode calc-trail-mode))
         (error "This command works only in a regular text buffer."))
    (let* ((col1 (save-excursion (goto-char top) (current-column)))
--- 1454,1480 ----
     (t s))
  )
  
! (defun calc-grab-region (top bot arg)
    "Parse the region as a matrix of numbers and push it on the Calculator stack.
  This is intended to be used in a non-Calculator buffer!
  If the start and the end of the region are in column zero, the contained lines
  are parsed into rows of the matrix.  Otherwise, point and mark define a
! rectangle which is parsed into a matrix.
! 
! With a positive numeric prefix N, each line is divided into columns of
! width N which become the elements of that row of the matrix.  With a
! prefix of zero, each line is interpreted in its entirety as a formula
! which becomes a row of the (one-column) matrix.
! 
! Otherwise, if a line contains a portion delimited by square brackets
! or curly braces (possibly surrounded by other ignored text), that portion
! is interpreted as a vector which becomes a row of the matrix.  This can be
! suppressed by giving a negative numeric prefix argument.
! 
! Otherwise, the entire contents of the line are parsed as if surrounded by
! brackets.  If a stack-style line number (as in \"23: \") is present it is
! first removed."
!   (interactive "r\nP")
    (and (memq major-mode '(calc-mode calc-trail-mode))
         (error "This command works only in a regular text buffer."))
    (let* ((col1 (save-excursion (goto-char top) (current-column)))
***************
*** 1481,1505 ****
      (calc)
      (setq mat (list 'vec)
  	  lnum 0)
      (while data
!       (if (string-match "[[{][^][{}]*[]}]" (car data))
! 	  (setq pos (match-beginning 0)
! 		vals (math-read-expr (math-match-substring (car data) 0)))
! 	(if (string-match "\\`\\([0-9]+:[ \t]\\)?\\(.*[^, \t]\\)[, \t]*\\'" (car data))
  	    (setq pos -1
! 		  vals (math-read-expr (concat "["
! 					       (math-match-substring
! 						(car data) 2)
! 					       "]")))
! 	  (setq pos -1
! 		vals (math-read-expr (concat "[" (car data) "]")))))
        (if (eq (car-safe vals) 'error)
  	  (progn
  	    (calc-quit)
  	    (switch-to-buffer from-buffer)
  	    (goto-char top)
! 	    (next-line lnum)
! 	    (forward-char (+ (nth 1 vals) pos))
  	    (error (nth 2 vals))))
        (setq mat (cons vals mat)
  	    data (cdr data)
--- 1495,1540 ----
      (calc)
      (setq mat (list 'vec)
  	  lnum 0)
+     (and arg
+ 	 (setq arg (prefix-numeric-value arg)))
      (while data
!       (if (natnump arg)
! 	  (progn
! 	    (if (= arg 0)
! 		(setq arg 1000000))
! 	    (setq pos 0
! 		  vals (list 'vec))
! 	    (let ((w (length (car data)))
! 		  j v)
! 	      (while (< pos w)
! 		(setq j (+ pos arg)
! 		      v (if (>= j w)
! 			    (math-read-expr (substring (car data) pos))
! 			  (math-read-expr (substring (car data) pos j))))
! 		(if (eq (car-safe v) 'error)
! 		    (setq vals v w 0)
! 		  (setq vals (nconc vals (list v))
! 			pos j)))))
! 	(if (and (null arg)
! 		 (string-match "[[{][^][{}]*[]}]" (car data)))
! 	    (setq pos (match-beginning 0)
! 		  vals (math-read-expr (math-match-substring (car data) 0)))
! 	  (if (string-match "\\`\\([0-9]+:[ \t]\\)?\\(.*[^, \t]\\)[, \t]*\\'"
! 			    (car data))
! 	      (setq pos -1
! 		    vals (math-read-expr (concat "["
! 						 (math-match-substring
! 						  (car data) 2)
! 						 "]")))
  	    (setq pos -1
! 		  vals (math-read-expr (concat "[" (car data) "]"))))))
        (if (eq (car-safe vals) 'error)
  	  (progn
  	    (calc-quit)
  	    (switch-to-buffer from-buffer)
  	    (goto-char top)
! 	    (forward-line lnum)
! 	    (forward-char (+ (nth 1 vals) (min col1 col2) pos))
  	    (error (nth 2 vals))))
        (setq mat (cons vals mat)
  	    data (cdr data)
***************
*** 2860,2865 ****
--- 2895,2901 ----
       ( \\tan	   . calcFunc-tan )
       ( \\sin	   . calcFunc-sin )
       ( \\sinh	   . calcFunc-sinh )
+      ( \\sqrt	   . calcFunc-sqrt )
       ( \\tanh	   . calcFunc-tanh )
       ( \\phi	   . calcFunc-totient )
       ( \\mu	   . calcFunc-moebius )
***************
*** 9917,9923 ****
  
  (defun math-choose (n m)   ; [I I I] [F F F] [Public]
    (cond ((and (integerp n) (integerp m) (<= m n) (>= m 0))
! 	 (math-choose-iter m n 1 1))
  	((not (math-realp n))
  	 (math-reject-arg n 'realp))
  	((not (math-realp m))
--- 9953,9961 ----
  
  (defun math-choose (n m)   ; [I I I] [F F F] [Public]
    (cond ((and (integerp n) (integerp m) (<= m n) (>= m 0))
! 	 (if (> m (/ n 2))
! 	     (math-choose-iter (- n m) n 1 1)
! 	   (math-choose-iter m n 1 1)))
  	((not (math-realp n))
  	 (math-reject-arg n 'realp))
  	((not (math-realp m))
***************
*** 10564,10570 ****
  (fset 'calcFunc-rsh (symbol-function 'math-rshift-binary))
  
  (defun math-shift-binary (a &optional n w)   ; [I I] [Public]
!   (if (not (Math-negp n))
        (math-lshift-binary a n w)
      (setq a (math-trunc a)
  	  n (if n (math-trunc n) 1))
--- 10602,10609 ----
  (fset 'calcFunc-rsh (symbol-function 'math-rshift-binary))
  
  (defun math-shift-binary (a &optional n w)   ; [I I] [Public]
!   (if (or (null n)
! 	  (not (Math-negp n)))
        (math-lshift-binary a n w)
      (setq a (math-trunc a)
  	  n (if n (math-trunc n) 1))
*** calc.texinfo	Tue Jun 26 16:34:50 1990
--- ../dist/calc.texinfo	Tue Jun 26 17:02:30 1990
***************
*** 1,7 ****
  \input texinfo                  @c -*-texinfo-*-
  @comment %**start of header (This is for running Texinfo on a region.)
  @setfilename calc-info
! @settitle GNU Emacs Calc 1.02 Manual
  @setchapternewpage odd
  @comment %**end of header (This is for running Texinfo on a region.)
  
--- 1,7 ----
  \input texinfo                  @c -*-texinfo-*-
  @comment %**start of header (This is for running Texinfo on a region.)
  @setfilename calc-info
! @settitle GNU Emacs Calc 1.03 Manual
  @setchapternewpage odd
  @comment %**end of header (This is for running Texinfo on a region.)
  
***************
*** 38,44 ****
  @sp 6
  @center @titlefont{Calc Manual}
  @sp 4
! @center GNU Emacs Calc Version 1.02
  @sp 1
  @center June 1990
  @sp 5
--- 38,44 ----
  @sp 6
  @center @titlefont{Calc Manual}
  @sp 4
! @center GNU Emacs Calc Version 1.03
  @sp 1
  @center June 1990
  @sp 5
***************
*** 1450,1456 ****
      .          1:  10000.         .
                     .
  
!   2. RET           1e4 RET        ^
  @end example
  @end group
  
--- 1450,1456 ----
      .          1:  10000.         .
                     .
  
!   2.0 RET          1e4 RET        ^
  @end example
  @end group
  
***************
*** 1497,1504 ****
  notation}.  You get them by pressing @kbd{d n}, @kbd{d f},
  @kbd{d s}, and @kbd{d e}, respectively.  In each case, you can
  supply a numeric prefix argument which says how many digits
! should be displayed.  As an example, put the following numbers
! onto the stack, then try some different display modes.  First,
  use @kbd{M-0 DEL} to clear the stack, then enter the four
  numbers shown here:
  
--- 1497,1504 ----
  notation}.  You get them by pressing @kbd{d n}, @kbd{d f},
  @kbd{d s}, and @kbd{d e}, respectively.  In each case, you can
  supply a numeric prefix argument which says how many digits
! should be displayed.  As an example, let's put a few numbers
! onto the stack and try some different display modes.  First,
  use @kbd{M-0 DEL} to clear the stack, then enter the four
  numbers shown here:
  
***************
*** 2767,2773 ****
  
  @group
  @example
! 1:  8 +/- 0.2    2:  8 +/- 0.2    1:  0.266 +/- 0.011   1:  14.9 +/- 0.594
      .            1:  30 +/- 1         .                     .
                       .
  
--- 2767,2773 ----
  
  @group
  @example
! 1:  8 +/- 0.2    2:  8 +/- 0.2    1:  0.266 +/- 0.011   1:  14.93 +/- 0.594
      .            1:  30 +/- 1         .                     .
                       .
  
***************
*** 8086,8109 ****
  The @kbd{M-#} key with a negative prefix argument (@kbd{M-- M-#}) is
  equivalent to @code{calc-grab-region}.
  
! Each line of the grabbed area must contain one or more numbers,
! separated by spaces and/or commas.  Leading and trailing square
! brackets, curly braces and commas on the line are ignored.  Leading
! line numbers (as found in the Calc stack) are also ignored.  Thus, this
! command can generally read anything from a column of numbers in a
! spreadsheet to a matrix in one of Calc's own display formats.  The
! grabbed values may actually be any Calc formulas, except that spaces
! not enclosed in parentheses will be interpreted as separating two
! separate formulas.@refill
  
  If a different language has been specified (@pxref{Language Modes}),
  the grabbed text will be interpreted according to the that language.
  
! Each line becomes a row of the matrix.  The result will actually be a
! vector of vectors, which Calc will treat as a matrix only if every row
! contains the same number of values.  @xref{Matrix Functions}, to see how
! to pull the matrix apart into its constituent rows and columns.  (If it
! is a 1x1 matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.)
  
  For example, suppose we have a column of numbers in a file which we
  wish to sum.  Go to one corner of the column and press @kbd{C-@@} to
--- 8086,8127 ----
  The @kbd{M-#} key with a negative prefix argument (@kbd{M-- M-#}) is
  equivalent to @code{calc-grab-region}.
  
! Each line of the grabbed area becomes a row of the matrix.  The result
! will actually be a vector of vectors, which Calc will treat as a matrix
! only if every row contains the same number of values.
  
+ If a line contains a portion surrounded by square brackets (or curly
+ braces), that portion is interpreted as a vector which becomes a row
+ of the matrix.  Any text surrounding the bracketed portion on the line
+ is ignored.
+ 
+ Otherwise, the entire line is interpreted as a row vector as if it
+ were surrounded by square brackets.  Leading line numbers (in the
+ format used in the Calc stack buffer) are ignored.  If you wish to
+ force this interpretation (even if the line contains bracketed
+ portions), give a negative numeric prefix argument to the
+ @code{calc-grab-region} command.
+ 
+ If you give a numeric prefix argument of zero, each line is instead
+ interpreted as a single formula which is converted into a one-element
+ vector.  Thus the result of @code{calc-grab-region} will be a one-column
+ matrix.  For example, suppose one line of the data is the expression
+ @samp{2 a}.  A plain @code{calc-grab-region} will interpret this as
+ @samp{[2 a]}, which in turn is read as a two-element vector.  But
+ with a zero prefix argument, it will be interpreted as @samp{[2*a]}.
+ 
+ If you give a positive numeric prefix argument @var{n}, then each line
+ will be split up into columns of width @var{n}; each column is parsed
+ separately as a matrix element.  If a line contained @samp{2 +/- 3 4 +/- 5},
+ then grabbing with a prefix argument of 8 would correctly split the
+ line into two error forms.
+ 
  If a different language has been specified (@pxref{Language Modes}),
  the grabbed text will be interpreted according to the that language.
  
! @xref{Matrix Functions}, to see how to pull the matrix apart into its
! constituent rows and columns.  (If it is a 1x1 matrix, just hit @kbd{v u}
! (@code{calc-unpack}) twice.)
  
  For example, suppose we have a column of numbers in a file which we
  wish to sum.  Go to one corner of the column and press @kbd{C-@@} to
***************
*** 10739,10744 ****
--- 10757,10779 ----
  The functions described here are responsible for parsing and formatting
  Calc numbers and formulas.
  
+ @defun calc-eval str sep arg1 arg2 @dots{}
+ This is the simplest interface to the Calculator from another Lisp program.
+ The algebraic expression(s) in @var{str} are parsed and evaluated; the
+ results are formatted as a string and returned.  If @var{str} contains
+ several expressions the results are separated by string @var{sep}, or
+ by the string @samp{", "} if @var{sep} is omitted.  If any additional
+ arguments are given, they are values (in Calc's internal format) to be
+ used for @kbd{$}, @kbd{$$}, and so on in the string.
+ 
+ If the string @var{str} contains an error, the return value is instead
+ a list of two items:  An integer index into @var{str} to show the
+ approximate position of the error, and an explanatory message string.
+ 
+ This function uses the mode settings in the @code{*Calculator*} buffer.
+ If no such buffer exists, it will be created as a side-effect.
+ @end defun
+ 
  @defun read-number str
  If string @var{str} contains a valid Calc number, either integer,
  fraction, float, or HMS form, this function parses and returns that
***************
*** 10895,10900 ****
--- 10930,10937 ----
  (autoload 'calc             ".../calc.elc"     "Calculator Mode" t nil)
  (autoload 'calc-extensions  ".../calc-ext.elc" nil nil nil)
  (autoload 'quick-calc       ".../calc.elc"     "Quick Calculator" t nil)
+ (autoload 'full-calc        ".../calc.elc"     "Full-screen Calculator" t nil)
+ (autoload 'calc-eval        ".../calc.elc"     "Call Calculator" nil nil)
  (autoload 'calc-grab-region ".../calc-ext.elc" nil t nil)
  (autoload 'defmath          ".../calc-ext.elc" nil t t)
  @end example
***************
*** 10909,10915 ****
  brings in the extensions module; Calc takes care to call the
  @code{calc-extensions} function (which doesn't actually do anything)
  before any operation that requires the extensions to be present.
! The other three @code{autoload} commands are for functions which might
  reasonably be used before the user has typed @kbd{M-x calc} for the
  first time.
  
--- 10946,10952 ----
  brings in the extensions module; Calc takes care to call the
  @code{calc-extensions} function (which doesn't actually do anything)
  before any operation that requires the extensions to be present.
! The other five @code{autoload} commands are for functions which might
  reasonably be used before the user has typed @kbd{M-x calc} for the
  first time.
  
***************
*** 10978,10987 ****
  To test your installation of Calc, start a fresh Emacs and type @kbd{M-#}
  to make sure the autoload commands and key bindings work.  Now, type
  @kbd{i} to make sure Calc can find its Info documentation.  Press @kbd{q}
! to exit the Info system.  Type @kbd{20 S} to compute the sine of
! 20 degrees; this will test the autoloading of the extensions module.
! The result should be 0.342020143326.  Finally, press @kbd{M-#} again to
! make sure the Calculator can exit.
  
  (The above text is included in both the Calc documentation and the
  file INSTALL in the Calc distribution directory.)
--- 11015,11024 ----
  To test your installation of Calc, start a fresh Emacs and type @kbd{M-#}
  to make sure the autoload commands and key bindings work.  Now, type
  @kbd{i} to make sure Calc can find its Info documentation.  Press @kbd{q}
! to exit the Info system and @kbd{M-#} to re-enter the Calculator.
! Type @kbd{20 S} to compute the sine of 20 degrees; this will test the
! autoloading of the extensions module.  The result should be 0.342020143326.
! Finally, press @kbd{M-#} again to make sure the Calculator can exit.
  
  (The above text is included in both the Calc documentation and the
  file INSTALL in the Calc distribution directory.)