calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
;;; calc.el --- the GNU Emacs calculator -*- lexical-binding:t -*-
|
2001-11-19 07:43:05 +00:00
|
|
|
|
|
2021-01-01 01:13:56 -08:00
|
|
|
|
;; Copyright (C) 1990-1993, 2001-2021 Free Software Foundation, Inc.
|
2001-11-19 07:43:05 +00:00
|
|
|
|
|
|
|
|
|
;; Author: David Gillespie <daveg@synaptics.com>
|
|
|
|
|
;; Keywords: convenience, extensions
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 03:16:00 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2007-03-19 20:59:53 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 03:16:00 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
2007-03-19 20:59:53 +00:00
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
2007-03-19 20:59:53 +00:00
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 15:52:52 -07:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2001-11-19 07:43:05 +00:00
|
|
|
|
;;; Commentary:
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2001-11-24 22:34:26 +00:00
|
|
|
|
;; Calc is split into many files. This file is the main entry point.
|
|
|
|
|
;; This file includes autoload commands for various other basic Calc
|
|
|
|
|
;; facilities. The more advanced features are based in calc-ext, which
|
|
|
|
|
;; in turn contains autoloads for the rest of the Calc files. This
|
|
|
|
|
;; odd set of interactions is designed to make Calc's loading time
|
|
|
|
|
;; be as short as possible when only simple calculations are needed.
|
|
|
|
|
|
|
|
|
|
;; Original author's address:
|
|
|
|
|
;; Dave Gillespie, daveg@synaptics.com, uunet!synaptx!daveg.
|
|
|
|
|
;; Synaptics, Inc., 2698 Orchard Parkway, San Jose, CA 95134.
|
|
|
|
|
;;
|
|
|
|
|
;; The old address daveg@csvax.cs.caltech.edu will continue to
|
|
|
|
|
;; work for the foreseeable future.
|
|
|
|
|
;;
|
|
|
|
|
;; Bug reports and suggestions are always welcome! (Type M-x
|
2019-05-26 18:08:01 +02:00
|
|
|
|
;; report-emacs-bug to send them).
|
2001-11-24 22:34:26 +00:00
|
|
|
|
|
|
|
|
|
;; All functions, macros, and Lisp variables defined here begin with one
|
|
|
|
|
;; of the prefixes "math", "Math", or "calc", with the exceptions of
|
|
|
|
|
;; "full-calc", "full-calc-keypad", "another-calc", "quick-calc",
|
2019-05-26 18:08:01 +02:00
|
|
|
|
;; and "defmath". User-accessible variables begin with "var-".
|
2001-11-24 22:34:26 +00:00
|
|
|
|
|
|
|
|
|
;;; TODO:
|
|
|
|
|
|
|
|
|
|
;; Fix rewrite mechanism to do less gratuitous rearrangement of terms.
|
|
|
|
|
;; Implement a pattern-based "refers" predicate.
|
|
|
|
|
;;
|
|
|
|
|
;; Make it possible to Undo a selection command.
|
|
|
|
|
;; Figure out how to allow selecting rows of matrices.
|
|
|
|
|
;; If cursor was in selection before, move it after j n, j p, j L, etc.
|
|
|
|
|
;; Consider reimplementing calc-delete-selection using rewrites.
|
|
|
|
|
;;
|
|
|
|
|
;; Implement line-breaking in non-flat compositions (is this desirable?).
|
|
|
|
|
;; Implement matrix formatting with multi-line components.
|
|
|
|
|
;;
|
|
|
|
|
;; Have "Z R" define a user command based on a set of rewrite rules.
|
|
|
|
|
;; Support "incf" and "decf" in defmath definitions.
|
|
|
|
|
;; Have defmath generate calls to calc-binary-op or calc-unary-op.
|
|
|
|
|
;; Make some way to define algebraic functions using keyboard macros.
|
|
|
|
|
;;
|
|
|
|
|
;; Allow calc-word-size=0 => Common Lisp-style signed bitwise arithmetic.
|
|
|
|
|
;; Consider digamma function (and thus arb. prec. Euler's gamma constant).
|
|
|
|
|
;; May as well make continued-fractions stuff available to the user.
|
|
|
|
|
;;
|
|
|
|
|
;; How about matrix eigenvalues, SVD, pseudo-inverse, etc.?
|
|
|
|
|
;; Should cache matrix inverses as well as decompositions.
|
|
|
|
|
;; If dividing by a non-square matrix, use least-squares automatically.
|
|
|
|
|
;; Consider supporting matrix exponentials.
|
|
|
|
|
;;
|
|
|
|
|
;; Have ninteg detect and work around singularities at the endpoints.
|
|
|
|
|
;; Use an adaptive subdivision algorithm for ninteg.
|
|
|
|
|
;; Provide nsum and nprod to go along with ninteg.
|
|
|
|
|
;;
|
|
|
|
|
;; Handle TeX-mode parsing of \matrix{ ... } where ... contains braces.
|
|
|
|
|
;; Support AmS-TeX's \{d,t,}frac, \{d,t,}binom notations.
|
|
|
|
|
;; Format and parse sums and products in Eqn and Math modes.
|
|
|
|
|
;;
|
|
|
|
|
;; Get math-read-big-expr to read sums, products, etc.
|
|
|
|
|
;; Change calc-grab-region to use math-read-big-expr.
|
|
|
|
|
;; Have a way to define functions using := in Embedded Mode.
|
|
|
|
|
;;
|
|
|
|
|
;; Support polar plotting with GNUPLOT.
|
|
|
|
|
;; Make a calc-graph-histogram function.
|
|
|
|
|
;;
|
|
|
|
|
;; Replace hokey formulas for complex functions with formulas designed
|
|
|
|
|
;; to minimize roundoff while maintaining the proper branch cuts.
|
|
|
|
|
;; Test accuracy of advanced math functions over whole complex plane.
|
|
|
|
|
;; Extend Bessel functions to provide arbitrary precision.
|
|
|
|
|
;; Extend advanced math functions to handle error forms and intervals.
|
|
|
|
|
;; Provide a better implementation for math-sin-cos-raw.
|
|
|
|
|
;; Provide a better implementation for math-hypot.
|
|
|
|
|
;; Provide a better implementation for math-make-frac.
|
|
|
|
|
;; Provide a better implementation for calcFunc-prfac.
|
|
|
|
|
;; Provide a better implementation for calcFunc-factor.
|
|
|
|
|
;;
|
|
|
|
|
;; Provide more examples in the tutorial section of the manual.
|
|
|
|
|
;; Cover in the tutorial: simplification modes, declarations,
|
|
|
|
|
;; bitwise stuff, selections, matrix mapping, financial functions.
|
|
|
|
|
;; Provide more Lisp programming examples in the manual.
|
|
|
|
|
;; Finish the Internals section of the manual (and bring it up to date).
|
|
|
|
|
;;
|
|
|
|
|
;; Tim suggests adding spreadsheet-like features.
|
|
|
|
|
;; Implement language modes for Gnuplot, Lisp, Ada, APL, ...?
|
|
|
|
|
;;
|
|
|
|
|
;; For atan series, if x > tan(pi/12) (about 0.268) reduce using the identity
|
|
|
|
|
;; atan(x) = atan((x * sqrt(3) - 1) / (sqrt(3) + x)) + pi/6.
|
|
|
|
|
;;
|
|
|
|
|
;; A better integration algorithm:
|
|
|
|
|
;; Use breadth-first instead of depth-first search, as follows:
|
|
|
|
|
;; The integral cache allows unfinished integrals in symbolic notation
|
|
|
|
|
;; on the righthand side. An entry with no unfinished integrals on the
|
|
|
|
|
;; RHS is "complete"; references to it elsewhere are replaced by the
|
|
|
|
|
;; integrated value. More than one cache entry for the same integral
|
|
|
|
|
;; may exist, though if one becomes complete, the others may be deleted.
|
|
|
|
|
;; The integrator works by using every applicable rule (such as
|
|
|
|
|
;; substitution, parts, linearity, etc.) to generate possible righthand
|
|
|
|
|
;; sides, all of which are entered into the cache. Now, as long as the
|
|
|
|
|
;; target integral is not complete (and the time limit has not run out)
|
|
|
|
|
;; choose an incomplete integral from the cache and, for every integral
|
|
|
|
|
;; appearing in its RHS's, add those integrals to the cache using the
|
2011-11-15 18:37:37 +01:00
|
|
|
|
;; same substitution, parts, etc. rules. The cache should be organized
|
2001-11-24 22:34:26 +00:00
|
|
|
|
;; as a priority queue, choosing the "simplest" incomplete integral at
|
|
|
|
|
;; each step, or choosing randomly among equally simple integrals.
|
|
|
|
|
;; Simplicity equals small size, and few steps removed from the original
|
|
|
|
|
;; target integral. Note that when the integrator finishes, incomplete
|
|
|
|
|
;; integrals can be left in the cache, so the algorithm can start where
|
|
|
|
|
;; it left off if another similar integral is later requested.
|
|
|
|
|
;; Breadth-first search would avoid the nagging problem of, e.g., whether
|
|
|
|
|
;; to use parts or substitution first, and which decomposition is best.
|
|
|
|
|
;; All are tried, and any path that diverges will quickly be put on the
|
|
|
|
|
;; back burner by the priority queue.
|
|
|
|
|
;; Note: Probably a good idea to call math-simplify-extended before
|
|
|
|
|
;; measuring a formula's simplicity.
|
|
|
|
|
|
2001-11-19 07:43:05 +00:00
|
|
|
|
;;; Code:
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2001-11-11 10:33:50 +00:00
|
|
|
|
(require 'calc-macs)
|
2021-09-06 12:56:02 +02:00
|
|
|
|
(require 'rect)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(calc-set-language, calc-edit-finish)
(calc-edit-cancel, calc-do-quick-calc, calc-do-calc-eval)
(calc-do-keypad, calcFunc-unixtime, math-parse-date)
(math-lessp, calc-embedded-finish-command)
(calc-embedded-select-buffer, calc-embedded-mode-line-change)
(calc-push-list-in-macro, calc-replace-selections)
(calc-record-list, calc-normalize-fancy, calc-do-handle-whys)
(calc-top-selected, calc-sel-error, calc-pop-stack-in-macro)
(calc-embedded-stack-change, calc-refresh-evaltos)
(calc-do-refresh, calc-binary-op-fancy, calc-unary-op-fancy)
(calc-delete-selection, calc-alg-digit-entry, calc-alg-entry)
(calc-dots, calc-temp-minibuffer-message, math-read-radix-digit)
(calc-digit-dots, math-normalize-fancy, math-normalize-nonstandard)
(math-recompile-eval-rules, math-apply-rewrites, calc-record-why)
(math-dimension-error, calc-incomplete-error, math-float-fancy)
(math-neg-fancy, math-zerop, calc-add-fractions)
(math-add-objects-fancy, math-add-symb-fancy, math-mul-zero)
(calc-mul-fractions, math-mul-objects-fancy, math-mul-symb-fancy)
(math-reject-arg, math-div-by-zero, math-div-zero, math-make-frac)
(calc-div-fractions, math-div-objects-fancy, math-div-symb-fancy)
(math-compose-expr, math-comp-width, math-composition-to-string)
(math-stack-value-offset-fancy, math-format-flat-expr-fancy)
(math-adjust-fraction, math-format-binary, math-format-radix)
(math-group-float, math-mod, math-format-number-fancy)
(math-format-bignum-fancy, math-read-number-fancy)
(calc-do-grab-region, calc-do-grab-rectangle, calc-do-embedded)
(calc-do-embedded-activate, math-do-defmath)
(calc-load-everything): Declare as functions.
2007-11-27 04:02:56 +00:00
|
|
|
|
;; Declare functions which are defined elsewhere.
|
|
|
|
|
(declare-function calc-set-language "calc-lang" (lang &optional option no-refresh))
|
|
|
|
|
(declare-function calc-edit-finish "calc-yank" (&optional keep))
|
|
|
|
|
(declare-function calc-edit-cancel "calc-yank" ())
|
2013-11-16 22:22:24 -06:00
|
|
|
|
(declare-function calc-locate-cursor-element "calc-yank" (pt))
|
2014-10-28 19:37:37 -05:00
|
|
|
|
(declare-function calc-do-quick-calc "calc-aent" (&optional insert))
|
(calc-set-language, calc-edit-finish)
(calc-edit-cancel, calc-do-quick-calc, calc-do-calc-eval)
(calc-do-keypad, calcFunc-unixtime, math-parse-date)
(math-lessp, calc-embedded-finish-command)
(calc-embedded-select-buffer, calc-embedded-mode-line-change)
(calc-push-list-in-macro, calc-replace-selections)
(calc-record-list, calc-normalize-fancy, calc-do-handle-whys)
(calc-top-selected, calc-sel-error, calc-pop-stack-in-macro)
(calc-embedded-stack-change, calc-refresh-evaltos)
(calc-do-refresh, calc-binary-op-fancy, calc-unary-op-fancy)
(calc-delete-selection, calc-alg-digit-entry, calc-alg-entry)
(calc-dots, calc-temp-minibuffer-message, math-read-radix-digit)
(calc-digit-dots, math-normalize-fancy, math-normalize-nonstandard)
(math-recompile-eval-rules, math-apply-rewrites, calc-record-why)
(math-dimension-error, calc-incomplete-error, math-float-fancy)
(math-neg-fancy, math-zerop, calc-add-fractions)
(math-add-objects-fancy, math-add-symb-fancy, math-mul-zero)
(calc-mul-fractions, math-mul-objects-fancy, math-mul-symb-fancy)
(math-reject-arg, math-div-by-zero, math-div-zero, math-make-frac)
(calc-div-fractions, math-div-objects-fancy, math-div-symb-fancy)
(math-compose-expr, math-comp-width, math-composition-to-string)
(math-stack-value-offset-fancy, math-format-flat-expr-fancy)
(math-adjust-fraction, math-format-binary, math-format-radix)
(math-group-float, math-mod, math-format-number-fancy)
(math-format-bignum-fancy, math-read-number-fancy)
(calc-do-grab-region, calc-do-grab-rectangle, calc-do-embedded)
(calc-do-embedded-activate, math-do-defmath)
(calc-load-everything): Declare as functions.
2007-11-27 04:02:56 +00:00
|
|
|
|
(declare-function calc-do-calc-eval "calc-aent" (str separator args))
|
|
|
|
|
(declare-function calc-do-keypad "calc-keypd" (&optional full-display interactive))
|
|
|
|
|
(declare-function calcFunc-unixtime "calc-forms" (date &optional zone))
|
|
|
|
|
(declare-function math-parse-date "calc-forms" (math-pd-str))
|
|
|
|
|
(declare-function math-lessp "calc-ext" (a b))
|
2009-11-15 23:55:53 +00:00
|
|
|
|
(declare-function math-compare "calc-ext" (a b))
|
2015-05-07 22:42:37 -07:00
|
|
|
|
(declare-function math-zerop "calc-misc" (a))
|
(calc-set-language, calc-edit-finish)
(calc-edit-cancel, calc-do-quick-calc, calc-do-calc-eval)
(calc-do-keypad, calcFunc-unixtime, math-parse-date)
(math-lessp, calc-embedded-finish-command)
(calc-embedded-select-buffer, calc-embedded-mode-line-change)
(calc-push-list-in-macro, calc-replace-selections)
(calc-record-list, calc-normalize-fancy, calc-do-handle-whys)
(calc-top-selected, calc-sel-error, calc-pop-stack-in-macro)
(calc-embedded-stack-change, calc-refresh-evaltos)
(calc-do-refresh, calc-binary-op-fancy, calc-unary-op-fancy)
(calc-delete-selection, calc-alg-digit-entry, calc-alg-entry)
(calc-dots, calc-temp-minibuffer-message, math-read-radix-digit)
(calc-digit-dots, math-normalize-fancy, math-normalize-nonstandard)
(math-recompile-eval-rules, math-apply-rewrites, calc-record-why)
(math-dimension-error, calc-incomplete-error, math-float-fancy)
(math-neg-fancy, math-zerop, calc-add-fractions)
(math-add-objects-fancy, math-add-symb-fancy, math-mul-zero)
(calc-mul-fractions, math-mul-objects-fancy, math-mul-symb-fancy)
(math-reject-arg, math-div-by-zero, math-div-zero, math-make-frac)
(calc-div-fractions, math-div-objects-fancy, math-div-symb-fancy)
(math-compose-expr, math-comp-width, math-composition-to-string)
(math-stack-value-offset-fancy, math-format-flat-expr-fancy)
(math-adjust-fraction, math-format-binary, math-format-radix)
(math-group-float, math-mod, math-format-number-fancy)
(math-format-bignum-fancy, math-read-number-fancy)
(calc-do-grab-region, calc-do-grab-rectangle, calc-do-embedded)
(calc-do-embedded-activate, math-do-defmath)
(calc-load-everything): Declare as functions.
2007-11-27 04:02:56 +00:00
|
|
|
|
(declare-function calc-embedded-finish-command "calc-embed" ())
|
|
|
|
|
(declare-function calc-embedded-select-buffer "calc-embed" ())
|
|
|
|
|
(declare-function calc-embedded-mode-line-change "calc-embed" ())
|
|
|
|
|
(declare-function calc-push-list-in-macro "calc-prog" (vals m sels))
|
|
|
|
|
(declare-function calc-replace-selections "calc-sel" (n vals m))
|
|
|
|
|
(declare-function calc-record-list "calc-misc" (vals &optional prefix))
|
|
|
|
|
(declare-function calc-normalize-fancy "calc-ext" (val))
|
|
|
|
|
(declare-function calc-do-handle-whys "calc-misc" ())
|
|
|
|
|
(declare-function calc-top-selected "calc-sel" (&optional n m))
|
|
|
|
|
(declare-function calc-sel-error "calc-sel" ())
|
|
|
|
|
(declare-function calc-pop-stack-in-macro "calc-prog" (n mm))
|
|
|
|
|
(declare-function calc-embedded-stack-change "calc-embed" ())
|
|
|
|
|
(declare-function calc-refresh-evaltos "calc-ext" (&optional which-var))
|
|
|
|
|
(declare-function calc-do-refresh "calc-misc" ())
|
|
|
|
|
(declare-function calc-binary-op-fancy "calc-ext" (name func arg ident unary))
|
|
|
|
|
(declare-function calc-unary-op-fancy "calc-ext" (name func arg))
|
|
|
|
|
(declare-function calc-delete-selection "calc-sel" (n))
|
|
|
|
|
(declare-function calc-alg-digit-entry "calc-aent" ())
|
|
|
|
|
(declare-function calc-alg-entry "calc-aent" (&optional initial prompt))
|
|
|
|
|
(declare-function calc-dots "calc-incom" ())
|
|
|
|
|
(declare-function calc-temp-minibuffer-message "calc-misc" (m))
|
|
|
|
|
(declare-function math-read-radix-digit "calc-misc" (dig))
|
|
|
|
|
(declare-function calc-digit-dots "calc-incom" ())
|
|
|
|
|
(declare-function math-normalize-fancy "calc-ext" (a))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(declare-function math-normalize-nonstandard "calc-ext" (a))
|
(calc-set-language, calc-edit-finish)
(calc-edit-cancel, calc-do-quick-calc, calc-do-calc-eval)
(calc-do-keypad, calcFunc-unixtime, math-parse-date)
(math-lessp, calc-embedded-finish-command)
(calc-embedded-select-buffer, calc-embedded-mode-line-change)
(calc-push-list-in-macro, calc-replace-selections)
(calc-record-list, calc-normalize-fancy, calc-do-handle-whys)
(calc-top-selected, calc-sel-error, calc-pop-stack-in-macro)
(calc-embedded-stack-change, calc-refresh-evaltos)
(calc-do-refresh, calc-binary-op-fancy, calc-unary-op-fancy)
(calc-delete-selection, calc-alg-digit-entry, calc-alg-entry)
(calc-dots, calc-temp-minibuffer-message, math-read-radix-digit)
(calc-digit-dots, math-normalize-fancy, math-normalize-nonstandard)
(math-recompile-eval-rules, math-apply-rewrites, calc-record-why)
(math-dimension-error, calc-incomplete-error, math-float-fancy)
(math-neg-fancy, math-zerop, calc-add-fractions)
(math-add-objects-fancy, math-add-symb-fancy, math-mul-zero)
(calc-mul-fractions, math-mul-objects-fancy, math-mul-symb-fancy)
(math-reject-arg, math-div-by-zero, math-div-zero, math-make-frac)
(calc-div-fractions, math-div-objects-fancy, math-div-symb-fancy)
(math-compose-expr, math-comp-width, math-composition-to-string)
(math-stack-value-offset-fancy, math-format-flat-expr-fancy)
(math-adjust-fraction, math-format-binary, math-format-radix)
(math-group-float, math-mod, math-format-number-fancy)
(math-format-bignum-fancy, math-read-number-fancy)
(calc-do-grab-region, calc-do-grab-rectangle, calc-do-embedded)
(calc-do-embedded-activate, math-do-defmath)
(calc-load-everything): Declare as functions.
2007-11-27 04:02:56 +00:00
|
|
|
|
(declare-function math-recompile-eval-rules "calc-alg" ())
|
|
|
|
|
(declare-function math-apply-rewrites "calc-rewr" (expr rules &optional heads math-apply-rw-ruleset))
|
|
|
|
|
(declare-function calc-record-why "calc-misc" (&rest stuff))
|
|
|
|
|
(declare-function math-dimension-error "calc-vec" ())
|
|
|
|
|
(declare-function calc-incomplete-error "calc-incom" (a))
|
|
|
|
|
(declare-function math-float-fancy "calc-arith" (a))
|
|
|
|
|
(declare-function math-neg-fancy "calc-arith" (a))
|
|
|
|
|
(declare-function calc-add-fractions "calc-frac" (a b))
|
|
|
|
|
(declare-function math-add-objects-fancy "calc-arith" (a b))
|
|
|
|
|
(declare-function math-add-symb-fancy "calc-arith" (a b))
|
|
|
|
|
(declare-function math-mul-zero "calc-arith" (a b))
|
|
|
|
|
(declare-function calc-mul-fractions "calc-frac" (a b))
|
|
|
|
|
(declare-function math-mul-objects-fancy "calc-arith" (a b))
|
|
|
|
|
(declare-function math-mul-symb-fancy "calc-arith" (a b))
|
|
|
|
|
(declare-function math-reject-arg "calc-misc" (&optional a p option))
|
|
|
|
|
(declare-function math-div-by-zero "calc-arith" (a b))
|
|
|
|
|
(declare-function math-div-zero "calc-arith" (a b))
|
|
|
|
|
(declare-function math-make-frac "calc-frac" (num den))
|
|
|
|
|
(declare-function calc-div-fractions "calc-frac" (a b))
|
|
|
|
|
(declare-function math-div-objects-fancy "calc-arith" (a b))
|
|
|
|
|
(declare-function math-div-symb-fancy "calc-arith" (a b))
|
2012-09-13 14:41:21 -04:00
|
|
|
|
(declare-function math-compose-expr "calccomp" (a prec &optional div))
|
(calc-set-language, calc-edit-finish)
(calc-edit-cancel, calc-do-quick-calc, calc-do-calc-eval)
(calc-do-keypad, calcFunc-unixtime, math-parse-date)
(math-lessp, calc-embedded-finish-command)
(calc-embedded-select-buffer, calc-embedded-mode-line-change)
(calc-push-list-in-macro, calc-replace-selections)
(calc-record-list, calc-normalize-fancy, calc-do-handle-whys)
(calc-top-selected, calc-sel-error, calc-pop-stack-in-macro)
(calc-embedded-stack-change, calc-refresh-evaltos)
(calc-do-refresh, calc-binary-op-fancy, calc-unary-op-fancy)
(calc-delete-selection, calc-alg-digit-entry, calc-alg-entry)
(calc-dots, calc-temp-minibuffer-message, math-read-radix-digit)
(calc-digit-dots, math-normalize-fancy, math-normalize-nonstandard)
(math-recompile-eval-rules, math-apply-rewrites, calc-record-why)
(math-dimension-error, calc-incomplete-error, math-float-fancy)
(math-neg-fancy, math-zerop, calc-add-fractions)
(math-add-objects-fancy, math-add-symb-fancy, math-mul-zero)
(calc-mul-fractions, math-mul-objects-fancy, math-mul-symb-fancy)
(math-reject-arg, math-div-by-zero, math-div-zero, math-make-frac)
(calc-div-fractions, math-div-objects-fancy, math-div-symb-fancy)
(math-compose-expr, math-comp-width, math-composition-to-string)
(math-stack-value-offset-fancy, math-format-flat-expr-fancy)
(math-adjust-fraction, math-format-binary, math-format-radix)
(math-group-float, math-mod, math-format-number-fancy)
(math-format-bignum-fancy, math-read-number-fancy)
(calc-do-grab-region, calc-do-grab-rectangle, calc-do-embedded)
(calc-do-embedded-activate, math-do-defmath)
(calc-load-everything): Declare as functions.
2007-11-27 04:02:56 +00:00
|
|
|
|
(declare-function math-comp-width "calccomp" (c))
|
|
|
|
|
(declare-function math-composition-to-string "calccomp" (c &optional width))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(declare-function math-stack-value-offset-fancy "calccomp" (c))
|
(calc-set-language, calc-edit-finish)
(calc-edit-cancel, calc-do-quick-calc, calc-do-calc-eval)
(calc-do-keypad, calcFunc-unixtime, math-parse-date)
(math-lessp, calc-embedded-finish-command)
(calc-embedded-select-buffer, calc-embedded-mode-line-change)
(calc-push-list-in-macro, calc-replace-selections)
(calc-record-list, calc-normalize-fancy, calc-do-handle-whys)
(calc-top-selected, calc-sel-error, calc-pop-stack-in-macro)
(calc-embedded-stack-change, calc-refresh-evaltos)
(calc-do-refresh, calc-binary-op-fancy, calc-unary-op-fancy)
(calc-delete-selection, calc-alg-digit-entry, calc-alg-entry)
(calc-dots, calc-temp-minibuffer-message, math-read-radix-digit)
(calc-digit-dots, math-normalize-fancy, math-normalize-nonstandard)
(math-recompile-eval-rules, math-apply-rewrites, calc-record-why)
(math-dimension-error, calc-incomplete-error, math-float-fancy)
(math-neg-fancy, math-zerop, calc-add-fractions)
(math-add-objects-fancy, math-add-symb-fancy, math-mul-zero)
(calc-mul-fractions, math-mul-objects-fancy, math-mul-symb-fancy)
(math-reject-arg, math-div-by-zero, math-div-zero, math-make-frac)
(calc-div-fractions, math-div-objects-fancy, math-div-symb-fancy)
(math-compose-expr, math-comp-width, math-composition-to-string)
(math-stack-value-offset-fancy, math-format-flat-expr-fancy)
(math-adjust-fraction, math-format-binary, math-format-radix)
(math-group-float, math-mod, math-format-number-fancy)
(math-format-bignum-fancy, math-read-number-fancy)
(calc-do-grab-region, calc-do-grab-rectangle, calc-do-embedded)
(calc-do-embedded-activate, math-do-defmath)
(calc-load-everything): Declare as functions.
2007-11-27 04:02:56 +00:00
|
|
|
|
(declare-function math-format-flat-expr-fancy "calc-ext" (a prec))
|
|
|
|
|
(declare-function math-adjust-fraction "calc-ext" (a))
|
|
|
|
|
(declare-function math-format-binary "calc-bin" (a))
|
|
|
|
|
(declare-function math-format-radix "calc-bin" (a))
|
2009-11-20 00:54:19 +00:00
|
|
|
|
(declare-function math-format-twos-complement "calc-bin" (a))
|
(calc-set-language, calc-edit-finish)
(calc-edit-cancel, calc-do-quick-calc, calc-do-calc-eval)
(calc-do-keypad, calcFunc-unixtime, math-parse-date)
(math-lessp, calc-embedded-finish-command)
(calc-embedded-select-buffer, calc-embedded-mode-line-change)
(calc-push-list-in-macro, calc-replace-selections)
(calc-record-list, calc-normalize-fancy, calc-do-handle-whys)
(calc-top-selected, calc-sel-error, calc-pop-stack-in-macro)
(calc-embedded-stack-change, calc-refresh-evaltos)
(calc-do-refresh, calc-binary-op-fancy, calc-unary-op-fancy)
(calc-delete-selection, calc-alg-digit-entry, calc-alg-entry)
(calc-dots, calc-temp-minibuffer-message, math-read-radix-digit)
(calc-digit-dots, math-normalize-fancy, math-normalize-nonstandard)
(math-recompile-eval-rules, math-apply-rewrites, calc-record-why)
(math-dimension-error, calc-incomplete-error, math-float-fancy)
(math-neg-fancy, math-zerop, calc-add-fractions)
(math-add-objects-fancy, math-add-symb-fancy, math-mul-zero)
(calc-mul-fractions, math-mul-objects-fancy, math-mul-symb-fancy)
(math-reject-arg, math-div-by-zero, math-div-zero, math-make-frac)
(calc-div-fractions, math-div-objects-fancy, math-div-symb-fancy)
(math-compose-expr, math-comp-width, math-composition-to-string)
(math-stack-value-offset-fancy, math-format-flat-expr-fancy)
(math-adjust-fraction, math-format-binary, math-format-radix)
(math-group-float, math-mod, math-format-number-fancy)
(math-format-bignum-fancy, math-read-number-fancy)
(calc-do-grab-region, calc-do-grab-rectangle, calc-do-embedded)
(calc-do-embedded-activate, math-do-defmath)
(calc-load-everything): Declare as functions.
2007-11-27 04:02:56 +00:00
|
|
|
|
(declare-function math-group-float "calc-ext" (str))
|
|
|
|
|
(declare-function math-mod "calc-misc" (a b))
|
|
|
|
|
(declare-function math-format-number-fancy "calc-ext" (a prec))
|
|
|
|
|
(declare-function math-read-number-fancy "calc-ext" (s))
|
|
|
|
|
(declare-function calc-do-grab-region "calc-yank" (top bot arg))
|
|
|
|
|
(declare-function calc-do-grab-rectangle "calc-yank" (top bot arg &optional reduce))
|
|
|
|
|
(declare-function calc-do-embedded "calc-embed" (calc-embed-arg end obeg oend))
|
|
|
|
|
(declare-function calc-do-embedded-activate "calc-embed" (calc-embed-arg cbuf))
|
|
|
|
|
(declare-function math-do-defmath "calc-prog" (func args body))
|
|
|
|
|
(declare-function calc-load-everything "calc-ext" ())
|
|
|
|
|
|
|
|
|
|
|
2005-04-01 21:43:47 +00:00
|
|
|
|
(defgroup calc nil
|
2012-04-22 21:58:00 +08:00
|
|
|
|
"Advanced desk calculator and mathematical tool."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:prefix "calc-"
|
2005-05-27 12:14:21 +00:00
|
|
|
|
:tag "Calc"
|
|
|
|
|
:group 'applications)
|
2005-04-01 21:43:47 +00:00
|
|
|
|
|
2009-08-29 19:22:38 +00:00
|
|
|
|
;; Do not autoload, so it is evaluated at run-time rather than at dump time.
|
|
|
|
|
;; ;;;###autoload
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-settings-file
|
2009-08-29 19:22:38 +00:00
|
|
|
|
(locate-user-emacs-file "calc.el" ".calc.el")
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"File in which to record permanent settings."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(file))
|
|
|
|
|
|
|
|
|
|
(defcustom calc-language-alist
|
|
|
|
|
'((latex-mode . latex)
|
|
|
|
|
(tex-mode . tex)
|
|
|
|
|
(plain-tex-mode . tex)
|
|
|
|
|
(context-mode . tex)
|
|
|
|
|
(nroff-mode . eqn)
|
|
|
|
|
(pascal-mode . pascal)
|
|
|
|
|
(c-mode . c)
|
|
|
|
|
(c++-mode . c)
|
|
|
|
|
(fortran-mode . fortran)
|
2007-08-17 03:57:06 +00:00
|
|
|
|
(f90-mode . fortran)
|
|
|
|
|
(texinfo-mode . calc-normal-language))
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Alist of major modes with appropriate Calc languages."
|
2007-09-26 00:09:32 +00:00
|
|
|
|
:type '(alist :key-type (symbol :tag "Major mode")
|
2005-04-04 03:56:45 +00:00
|
|
|
|
:value-type (symbol :tag "Calc language")))
|
2005-04-01 21:43:47 +00:00
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-announce-formula
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"%Embed\n\\(% .*\n\\)*"
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"A regular expression which is sure to be followed by a `calc-embedded' formula."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(regexp))
|
|
|
|
|
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(defcustom calc-embedded-announce-formula-alist
|
2005-07-11 06:43:39 +00:00
|
|
|
|
'((c++-mode . "//Embed\n\\(// .*\n\\)*")
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(c-mode . "/\\*Embed\\*/\n\\(/\\* .*\\*/\n\\)*")
|
2005-07-11 06:43:39 +00:00
|
|
|
|
(f90-mode . "!Embed\n\\(! .*\n\\)*")
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(fortran-mode . "C Embed\n\\(C .*\n\\)*")
|
2005-07-11 06:43:39 +00:00
|
|
|
|
(html-helper-mode . "<!-- Embed -->\n\\(<!-- .* -->\n\\)*")
|
|
|
|
|
(html-mode . "<!-- Embed -->\n\\(<!-- .* -->\n\\)*")
|
|
|
|
|
(nroff-mode . "\\\\\"Embed\n\\(\\\\\" .*\n\\)*")
|
|
|
|
|
(pascal-mode . "{Embed}\n\\({.*}\n\\)*")
|
|
|
|
|
(sgml-mode . "<!-- Embed -->\n\\(<!-- .* -->\n\\)*")
|
|
|
|
|
(xml-mode . "<!-- Embed -->\n\\(<!-- .* -->\n\\)*")
|
|
|
|
|
(texinfo-mode . "@c Embed\n\\(@c .*\n\\)*"))
|
2020-12-19 17:26:58 +01:00
|
|
|
|
"Alist of major modes for `calc-embedded-announce-formula'."
|
2005-07-09 03:41:40 +00:00
|
|
|
|
:type '(alist :key-type (symbol :tag "Major mode")
|
|
|
|
|
:value-type (regexp :tag "Regexp to announce formula")))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-open-formula
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"\\`\\|^\n\\|\\$\\$?\\|\\\\\\[\\|^\\\\begin[^{].*\n\\|^\\\\begin{.*[^x]}.*\n\\|^@.*\n\\|^\\.EQ.*\n\\|\\\\(\\|^%\n\\|^\\.\\\\\"\n"
|
2020-12-19 17:26:58 +01:00
|
|
|
|
"Regexp for the opening delimiter of a formula used by `calc-embedded'."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(regexp))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-close-formula
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"\\'\\|\n$\\|\\$\\$?\\|\\\\]\\|^\\\\end[^{].*\n\\|^\\\\end{.*[^x]}.*\n\\|^@.*\n\\|^\\.EN.*\n\\|\\\\)\\|\n%\n\\|^\\.\\\\\"\n"
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"Regexp for the closing delimiter of a formula used by `calc-embedded'."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(regexp))
|
|
|
|
|
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(defcustom calc-embedded-open-close-formula-alist
|
|
|
|
|
nil
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"Alist of major modes with pairs of formula delimiters used by `calc-embedded'."
|
2005-07-09 03:41:40 +00:00
|
|
|
|
:type '(alist :key-type (symbol :tag "Major mode")
|
|
|
|
|
:value-type (list (regexp :tag "Opening formula delimiter")
|
|
|
|
|
(regexp :tag "Closing formula delimiter"))))
|
|
|
|
|
|
2008-10-10 14:30:22 +00:00
|
|
|
|
(defcustom calc-embedded-word-regexp
|
|
|
|
|
"[-+]?[0-9]+\\(\\.[0-9]+\\)?\\([eE][-+]?[0-9]+\\)?"
|
|
|
|
|
"A regular expression determining a word for calc-embedded-word."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(regexp))
|
|
|
|
|
|
2008-10-10 14:30:22 +00:00
|
|
|
|
(defcustom calc-embedded-word-regexp-alist
|
2005-07-09 03:41:40 +00:00
|
|
|
|
nil
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Alist of major modes with word regexps used by calc-embedded-word."
|
2005-07-09 03:41:40 +00:00
|
|
|
|
:type '(alist :key-type (symbol :tag "Major mode")
|
2008-10-10 14:30:22 +00:00
|
|
|
|
:value-type (regexp :tag "Regexp for word")))
|
2005-07-09 03:41:40 +00:00
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-open-plain
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"%%% "
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"A string which is the opening delimiter for a \"plain\" formula.
|
2005-04-01 21:43:47 +00:00
|
|
|
|
If calc-show-plain mode is enabled, this is inserted at the front of
|
|
|
|
|
each formula."
|
|
|
|
|
:type '(string))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-close-plain
|
2005-04-01 21:43:47 +00:00
|
|
|
|
" %%%\n"
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"A string which is the closing delimiter for a \"plain\" formula.
|
2005-04-01 21:43:47 +00:00
|
|
|
|
See calc-embedded-open-plain."
|
|
|
|
|
:type '(string))
|
|
|
|
|
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(defcustom calc-embedded-open-close-plain-alist
|
2005-07-11 06:43:39 +00:00
|
|
|
|
'((c++-mode "// %% " " %%\n")
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(c-mode "/* %% " " %% */\n")
|
2005-07-11 06:43:39 +00:00
|
|
|
|
(f90-mode "! %% " " %%\n")
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(fortran-mode "C %% " " %%\n")
|
2005-07-11 06:43:39 +00:00
|
|
|
|
(html-helper-mode "<!-- %% " " %% -->\n")
|
|
|
|
|
(html-mode "<!-- %% " " %% -->\n")
|
|
|
|
|
(nroff-mode "\\\" %% " " %%\n")
|
|
|
|
|
(pascal-mode "{%% " " %%}\n")
|
|
|
|
|
(sgml-mode "<!-- %% " " %% -->\n")
|
|
|
|
|
(xml-mode "<!-- %% " " %% -->\n")
|
|
|
|
|
(texinfo-mode "@c %% " " %%\n"))
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Alist of major modes with pairs of delimiters for \"plain\" formulas."
|
2005-07-09 03:41:40 +00:00
|
|
|
|
:type '(alist :key-type (symbol :tag "Major mode")
|
|
|
|
|
:value-type (list (string :tag "Opening \"plain\" delimiter")
|
|
|
|
|
(string :tag "Closing \"plain\" delimiter"))))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-open-new-formula
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"\n\n"
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"A string which is inserted at front of formula by calc-embedded-new-formula."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(string))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-close-new-formula
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"\n\n"
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"A string which is inserted at end of formula by calc-embedded-new-formula."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(string))
|
|
|
|
|
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(defcustom calc-embedded-open-close-new-formula-alist
|
|
|
|
|
nil
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Alist of major modes with pairs of new formula delimiters used by calc-embedded."
|
2005-07-09 03:41:40 +00:00
|
|
|
|
:type '(alist :key-type (symbol :tag "Major mode")
|
|
|
|
|
:value-type (list (string :tag "Opening new formula delimiter")
|
|
|
|
|
(string :tag "Closing new formula delimiter"))))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-open-mode
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"% "
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"A string which should precede `calc-embedded' mode annotations.
|
2005-04-01 21:43:47 +00:00
|
|
|
|
This is not required to be present for user-written mode annotations."
|
|
|
|
|
:type '(string))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-embedded-close-mode
|
2005-04-01 21:43:47 +00:00
|
|
|
|
"\n"
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"A string which should follow `calc-embedded' mode annotations.
|
2005-04-01 21:43:47 +00:00
|
|
|
|
This is not required to be present for user-written mode annotations."
|
|
|
|
|
:type '(string))
|
|
|
|
|
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(defcustom calc-embedded-open-close-mode-alist
|
2005-07-11 06:43:39 +00:00
|
|
|
|
'((c++-mode "// " "\n")
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(c-mode "/* " " */\n")
|
2005-07-11 06:43:39 +00:00
|
|
|
|
(f90-mode "! " "\n")
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(fortran-mode "C " "\n")
|
2005-07-11 06:43:39 +00:00
|
|
|
|
(html-helper-mode "<!-- " " -->\n")
|
|
|
|
|
(html-mode "<!-- " " -->\n")
|
|
|
|
|
(nroff-mode "\\\" " "\n")
|
|
|
|
|
(pascal-mode "{ " " }\n")
|
|
|
|
|
(sgml-mode "<!-- " " -->\n")
|
|
|
|
|
(xml-mode "<!-- " " -->\n")
|
|
|
|
|
(texinfo-mode "@c " "\n"))
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Alist of major modes with pairs of strings to delimit annotations."
|
2005-07-09 03:41:40 +00:00
|
|
|
|
:type '(alist :key-type (symbol :tag "Major mode")
|
|
|
|
|
:value-type (list (string :tag "Opening annotation delimiter")
|
|
|
|
|
(string :tag "Closing annotation delimiter"))))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(defcustom calc-gnuplot-name
|
2019-01-13 17:50:16 +02:00
|
|
|
|
(if (and (eq system-type 'windows-nt)
|
|
|
|
|
;; Gnuplot v4.x on MS-Windows came with a special
|
|
|
|
|
;; pipe-enabled gnuplot executable for batch-mode
|
|
|
|
|
;; execution; newer versions allow using gnuplot.exe.
|
|
|
|
|
(executable-find "pgnuplot"))
|
|
|
|
|
"pgnuplot"
|
|
|
|
|
"gnuplot")
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Name of GNUPLOT program, for calc-graph features."
|
2019-01-13 17:50:16 +02:00
|
|
|
|
:type '(string)
|
|
|
|
|
:version "26.2")
|
2005-04-01 21:43:47 +00:00
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-gnuplot-plot-command nil
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Name of command for displaying GNUPLOT output; %s = file name to print."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(choice (string) (sexp)))
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-gnuplot-print-command "lp %s"
|
(calc-settings-file, calc-language-alist)
calc-embedded-announce-formula, calc-embedded-announce-formula-alist)
calc-embedded-open-formula, calc-embedded-close-formula)
calc-embedded-open-close-formula-alist)
calc-embedded-word-regexp-alist, calc-embedded-open-plain)
calc-embedded-close-plain, calc-embedded-open-close-plain-alist)
calc-embedded-open-new-formula, calc-embedded-close-new-formula)
calc-embedded-open-close-new-formula-alist, calc-embedded-open-mode)
calc-embedded-close-mode, calc-embedded-open-close-mode-alist)
calc-gnuplot-name, calc-gnuplot-plot-command)
calc-gnuplot-print-command, calc-multiplication-has-precedence):
Remove unnecessary asterisks from docstrings.
2008-11-25 01:30:22 +00:00
|
|
|
|
"Name of command for printing GNUPLOT output; %s = file name to print."
|
2005-04-01 21:43:47 +00:00
|
|
|
|
:type '(choice (string) (sexp)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-multiplication-has-precedence t
|
|
|
|
|
"If non-nil, multiplication has precedence over division in normal mode."
|
2007-06-20 04:07:24 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-ensure-consistent-units nil
|
2021-09-22 20:26:40 +02:00
|
|
|
|
"If non-nil, ensure new units are consistent with current units when converting."
|
2012-10-06 13:30:26 -07:00
|
|
|
|
:version "24.3"
|
2012-05-18 22:00:48 -05:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-context-sensitive-enter nil
|
2013-12-19 22:53:24 -06:00
|
|
|
|
"If non-nil, the stack element under the cursor will be copied by `calc-enter'
|
|
|
|
|
and deleted by `calc-pop'."
|
2013-11-16 22:22:24 -06:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-undo-length 100
|
2009-07-21 18:56:35 +00:00
|
|
|
|
"The number of undo steps that will be preserved when Calc is quit."
|
|
|
|
|
:type 'integer)
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-highlight-selections-with-faces nil
|
2010-08-07 22:04:57 -05:00
|
|
|
|
"If non-nil, use a separate face to indicate selected sub-formulas.
|
Disambiguate function and variable references in docstrings.
* lisp/comint.el (comint-history-isearch-message): Fix ambiguous doc
string cross-reference(s).
* lisp/ffap.el (ffap-string-at-point-region, ffap-next)
(ffap-string-at-point, ffap-string-around)
(ffap-copy-string-as-kill, ffap-highlight-overlay)
(ffap-literally): Fix ambiguous doc string cross-reference(s).
* lisp/font-lock.el (font-lock-keywords-alist)
(font-lock-removed-keywords-alist): Fix ambiguous doc string
cross-reference(s).
* lisp/help-mode.el (help-xref-symbol-regexp): Add "call" as a hint for
a cross-reference to a function.
* lisp/info.el (Info-find-emacs-command-nodes): Fix ambiguous doc
string cross-reference(s).
* lisp/isearch.el (isearch-message-function, isearch-fail-pos): Fix
ambiguous doc string cross-reference(s).
* lisp/misearch.el (multi-isearch-next-buffer-function): Fix ambiguous
doc string cross-reference(s).
* lisp/newcomment.el (comment-box): Fix ambiguous doc string
cross-reference(s).
* lisp/printing.el (pr-txt-printer-alist, pr-ps-printer-alist)
(pr-setting-database): Fix ambiguous doc string
cross-reference(s).
* lisp/ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces)
(ps-n-up-filling-database): Fix ambiguous doc string
cross-reference(s).
* lisp/server.el (server-buffer, server-log): Fix ambiguous doc string
cross-reference(s).
* lisp/simple.el (newline, delete-backward-char, delete-forward-char)
(minibuffer-history-isearch-message, kill-line, track-eol)
(temporary-goal-column): Fix ambiguous doc string
cross-reference(s).
* lisp/whitespace.el (whitespace-point)
(whitespace-font-lock-refontify, whitespace-bob-marker)
(whitespace-eob-marker): Fix ambiguous doc string
cross-reference(s).
* lisp/calc/calc.el (calc-highlight-selections-with-faces)
(calc-dispatch): Fix ambiguous doc string cross-reference(s).
* lisp/emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): Fix
ambiguous doc string cross-reference(s).
* lisp/gnus/gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string
cross-reference(s).
* lisp/gnus/gnus-sum.el (gnus-summary-newsgroup-prefix): Fix ambiguous doc string
cross-reference(s).
* lisp/international/mule.el (add-to-coding-system-list): Fix ambiguous
doc string cross-reference(s).
* lisp/progmodes/cc-fonts.el (c-font-lock-keywords-3)
(c++-font-lock-keywords-3, objc-font-lock-keywords-3)
(java-font-lock-keywords-3, idl-font-lock-keywords-3)
(pike-font-lock-keywords-3): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/compile.el (compile): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/etags.el (tags-table-files)
(tags-table-files-function, tags-included-tables-function): Fix
ambiguous doc string cross-reference(s).
* lisp/progmodes/gdb-mi.el (gdb, gdb-setup-windows)
(gdb-restore-windows): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/flyspell.el (flyspell-mark-duplications-flag)
(flyspell-default-deplacement-commands): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/ispell.el (ispell-accept-output): Fix ambiguous doc
string cross-reference(s).
* lisp/textmodes/sgml-mode.el (html-tag-help): Fix ambiguous doc string
cross-reference(s).
* lisp/vc/compare-w.el (compare-ignore-whitespace)
(compare-ignore-case, compare-windows-dehighlight): Fix ambiguous
doc string cross-reference(s).
* lisp/vc/diff.el (diff): Fix ambiguous doc string cross-reference(s).
* src/insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix
ambiguous doc string cross-reference(s).
* src/keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
doc string cross-reference(s).
* src/window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
string cross-reference(s).
Fixes: debbugs:12686
2013-01-11 18:08:55 -05:00
|
|
|
|
If option `calc-show-selections' is non-nil, then selected sub-formulas are
|
|
|
|
|
shown by displaying the rest of the formula in `calc-nonselected-face'.
|
|
|
|
|
If option `calc-show-selections' is nil, then selected sub-formulas are shown
|
2010-08-07 22:04:57 -05:00
|
|
|
|
by displaying the sub-formula in `calc-selected-face'."
|
Add missing :version tags to new defgroups and defcustoms
* window.el (window-sides-slots):
* tool-bar.el (tool-bar-position):
* term/xterm.el (xterm-extra-capabilities):
* ses.el (ses-self-reference-early-detection):
* progmodes/verilog-mode.el (verilog-auto-declare-nettype)
(verilog-auto-wire-type)
(verilog-auto-delete-trailing-whitespace)
(verilog-auto-reset-blocking-in-non, verilog-auto-inst-sort)
(verilog-auto-tieoff-declaration):
* progmodes/sql.el (sql-login-hook, sql-ansi-statement-starters)
(sql-oracle-statement-starters, sql-oracle-scan-on):
* progmodes/prolog.el (prolog-align-comments-flag)
(prolog-indent-mline-comments-flag, prolog-object-end-to-0-flag)
(prolog-left-indent-regexp, prolog-paren-indent-p)
(prolog-paren-indent, prolog-parse-mode, prolog-keywords)
(prolog-types, prolog-mode-specificators)
(prolog-determinism-specificators, prolog-directives)
(prolog-electric-newline-flag, prolog-hungry-delete-key-flag)
(prolog-electric-dot-flag)
(prolog-electric-dot-full-predicate-template)
(prolog-electric-underscore-flag, prolog-electric-tab-flag)
(prolog-electric-if-then-else-flag, prolog-electric-colon-flag)
(prolog-electric-dash-flag, prolog-old-sicstus-keys-flag)
(prolog-program-switches, prolog-prompt-regexp)
(prolog-debug-on-string, prolog-debug-off-string)
(prolog-trace-on-string, prolog-trace-off-string)
(prolog-zip-on-string, prolog-zip-off-string)
(prolog-use-standard-consult-compile-method-flag)
(prolog-use-prolog-tokenizer-flag, prolog-imenu-flag)
(prolog-imenu-max-lines, prolog-info-predicate-index)
(prolog-underscore-wordchar-flag, prolog-use-sicstus-sd)
(prolog-char-quote-workaround):
* progmodes/cc-vars.el (c-defun-tactic):
* net/tramp.el (tramp-encoding-command-interactive)
(tramp-local-end-of-line):
* net/soap-client.el (soap-client):
* net/netrc.el (netrc-file):
* net/gnutls.el (gnutls):
* minibuffer.el (completion-category-overrides)
(completion-cycle-threshold)
(completion-pcm-complete-word-inserts-delimiters):
* man.el (Man-name-local-regexp):
* mail/feedmail.el (feedmail-display-full-frame):
* international/characters.el (glyphless-char-display-control):
* eshell/em-ls.el (eshell-ls-date-format):
* emacs-lisp/cl-indent.el (lisp-lambda-list-keyword-alignment)
(lisp-lambda-list-keyword-parameter-indentation)
(lisp-lambda-list-keyword-parameter-alignment):
* doc-view.el (doc-view-image-width, doc-view-unoconv-program):
* dired-x.el (dired-omit-verbose):
* cus-theme.el (custom-theme-allow-multiple-selections):
* calc/calc.el (calc-highlight-selections-with-faces)
(calc-lu-field-reference, calc-lu-power-reference)
(calc-note-threshold):
* battery.el (battery-mode-line-limit):
* arc-mode.el (archive-7z-extract, archive-7z-expunge)
(archive-7z-update):
* allout.el (allout-prefixed-keybindings)
(allout-unprefixed-keybindings)
(allout-inhibit-auto-fill-on-headline)
(allout-flattened-numbering-abbreviation):
* allout-widgets.el (allout-widgets-auto-activation)
(allout-widgets-icons-dark-subdir)
(allout-widgets-icons-light-subdir, allout-widgets-icon-types)
(allout-widgets-theme-dark-background)
(allout-widgets-theme-light-background)
(allout-widgets-item-image-properties-emacs)
(allout-widgets-item-image-properties-xemacs)
(allout-widgets-run-unit-tests-on-load)
(allout-widgets-time-decoration-activity)
(allout-widgets-hook-error-post-time)
(allout-widgets-track-decoration):
* gnus/sieve-manage.el (sieve-manage-default-stream):
* gnus/shr.el (shr):
* gnus/nnir.el (nnir-ignored-newsgroups, nnir-summary-line-format)
(nnir-retrieve-headers-override-function)
(nnir-imap-default-search-key, nnir-notmuch-program)
(nnir-notmuch-additional-switches, nnir-notmuch-remove-prefix)
(nnir-method-default-engines):
* gnus/message.el (message-cite-reply-position):
* gnus/gssapi.el (gssapi-program):
* gnus/gravatar.el (gravatar):
* gnus/gnus-sum.el (gnus-refer-thread-use-nnir):
* gnus/gnus-registry.el (gnus-registry-unfollowed-addresses)
(gnus-registry-max-pruned-entries):
* gnus/gnus-picon.el (gnus-picon-inhibit-top-level-domains):
* gnus/gnus-int.el (gnus-after-set-mark-hook)
(gnus-before-update-mark-hook):
* gnus/gnus-async.el (gnus-async-post-fetch-function):
* gnus/auth-source.el (auth-source-cache-expiry):
Add missing :version tags to new defcustoms and defgroups.
2012-02-11 14:13:29 -08:00
|
|
|
|
:version "24.1"
|
2010-08-07 22:04:57 -05:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-lu-field-reference "20 uPa"
|
2011-01-23 23:08:04 -06:00
|
|
|
|
"The default reference level for logarithmic units (field)."
|
Add missing :version tags to new defgroups and defcustoms
* window.el (window-sides-slots):
* tool-bar.el (tool-bar-position):
* term/xterm.el (xterm-extra-capabilities):
* ses.el (ses-self-reference-early-detection):
* progmodes/verilog-mode.el (verilog-auto-declare-nettype)
(verilog-auto-wire-type)
(verilog-auto-delete-trailing-whitespace)
(verilog-auto-reset-blocking-in-non, verilog-auto-inst-sort)
(verilog-auto-tieoff-declaration):
* progmodes/sql.el (sql-login-hook, sql-ansi-statement-starters)
(sql-oracle-statement-starters, sql-oracle-scan-on):
* progmodes/prolog.el (prolog-align-comments-flag)
(prolog-indent-mline-comments-flag, prolog-object-end-to-0-flag)
(prolog-left-indent-regexp, prolog-paren-indent-p)
(prolog-paren-indent, prolog-parse-mode, prolog-keywords)
(prolog-types, prolog-mode-specificators)
(prolog-determinism-specificators, prolog-directives)
(prolog-electric-newline-flag, prolog-hungry-delete-key-flag)
(prolog-electric-dot-flag)
(prolog-electric-dot-full-predicate-template)
(prolog-electric-underscore-flag, prolog-electric-tab-flag)
(prolog-electric-if-then-else-flag, prolog-electric-colon-flag)
(prolog-electric-dash-flag, prolog-old-sicstus-keys-flag)
(prolog-program-switches, prolog-prompt-regexp)
(prolog-debug-on-string, prolog-debug-off-string)
(prolog-trace-on-string, prolog-trace-off-string)
(prolog-zip-on-string, prolog-zip-off-string)
(prolog-use-standard-consult-compile-method-flag)
(prolog-use-prolog-tokenizer-flag, prolog-imenu-flag)
(prolog-imenu-max-lines, prolog-info-predicate-index)
(prolog-underscore-wordchar-flag, prolog-use-sicstus-sd)
(prolog-char-quote-workaround):
* progmodes/cc-vars.el (c-defun-tactic):
* net/tramp.el (tramp-encoding-command-interactive)
(tramp-local-end-of-line):
* net/soap-client.el (soap-client):
* net/netrc.el (netrc-file):
* net/gnutls.el (gnutls):
* minibuffer.el (completion-category-overrides)
(completion-cycle-threshold)
(completion-pcm-complete-word-inserts-delimiters):
* man.el (Man-name-local-regexp):
* mail/feedmail.el (feedmail-display-full-frame):
* international/characters.el (glyphless-char-display-control):
* eshell/em-ls.el (eshell-ls-date-format):
* emacs-lisp/cl-indent.el (lisp-lambda-list-keyword-alignment)
(lisp-lambda-list-keyword-parameter-indentation)
(lisp-lambda-list-keyword-parameter-alignment):
* doc-view.el (doc-view-image-width, doc-view-unoconv-program):
* dired-x.el (dired-omit-verbose):
* cus-theme.el (custom-theme-allow-multiple-selections):
* calc/calc.el (calc-highlight-selections-with-faces)
(calc-lu-field-reference, calc-lu-power-reference)
(calc-note-threshold):
* battery.el (battery-mode-line-limit):
* arc-mode.el (archive-7z-extract, archive-7z-expunge)
(archive-7z-update):
* allout.el (allout-prefixed-keybindings)
(allout-unprefixed-keybindings)
(allout-inhibit-auto-fill-on-headline)
(allout-flattened-numbering-abbreviation):
* allout-widgets.el (allout-widgets-auto-activation)
(allout-widgets-icons-dark-subdir)
(allout-widgets-icons-light-subdir, allout-widgets-icon-types)
(allout-widgets-theme-dark-background)
(allout-widgets-theme-light-background)
(allout-widgets-item-image-properties-emacs)
(allout-widgets-item-image-properties-xemacs)
(allout-widgets-run-unit-tests-on-load)
(allout-widgets-time-decoration-activity)
(allout-widgets-hook-error-post-time)
(allout-widgets-track-decoration):
* gnus/sieve-manage.el (sieve-manage-default-stream):
* gnus/shr.el (shr):
* gnus/nnir.el (nnir-ignored-newsgroups, nnir-summary-line-format)
(nnir-retrieve-headers-override-function)
(nnir-imap-default-search-key, nnir-notmuch-program)
(nnir-notmuch-additional-switches, nnir-notmuch-remove-prefix)
(nnir-method-default-engines):
* gnus/message.el (message-cite-reply-position):
* gnus/gssapi.el (gssapi-program):
* gnus/gravatar.el (gravatar):
* gnus/gnus-sum.el (gnus-refer-thread-use-nnir):
* gnus/gnus-registry.el (gnus-registry-unfollowed-addresses)
(gnus-registry-max-pruned-entries):
* gnus/gnus-picon.el (gnus-picon-inhibit-top-level-domains):
* gnus/gnus-int.el (gnus-after-set-mark-hook)
(gnus-before-update-mark-hook):
* gnus/gnus-async.el (gnus-async-post-fetch-function):
* gnus/auth-source.el (auth-source-cache-expiry):
Add missing :version tags to new defcustoms and defgroups.
2012-02-11 14:13:29 -08:00
|
|
|
|
:version "24.1"
|
2011-01-23 23:08:04 -06:00
|
|
|
|
:type '(string))
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
(defcustom calc-lu-power-reference "mW"
|
2011-01-23 23:08:04 -06:00
|
|
|
|
"The default reference level for logarithmic units (power)."
|
Add missing :version tags to new defgroups and defcustoms
* window.el (window-sides-slots):
* tool-bar.el (tool-bar-position):
* term/xterm.el (xterm-extra-capabilities):
* ses.el (ses-self-reference-early-detection):
* progmodes/verilog-mode.el (verilog-auto-declare-nettype)
(verilog-auto-wire-type)
(verilog-auto-delete-trailing-whitespace)
(verilog-auto-reset-blocking-in-non, verilog-auto-inst-sort)
(verilog-auto-tieoff-declaration):
* progmodes/sql.el (sql-login-hook, sql-ansi-statement-starters)
(sql-oracle-statement-starters, sql-oracle-scan-on):
* progmodes/prolog.el (prolog-align-comments-flag)
(prolog-indent-mline-comments-flag, prolog-object-end-to-0-flag)
(prolog-left-indent-regexp, prolog-paren-indent-p)
(prolog-paren-indent, prolog-parse-mode, prolog-keywords)
(prolog-types, prolog-mode-specificators)
(prolog-determinism-specificators, prolog-directives)
(prolog-electric-newline-flag, prolog-hungry-delete-key-flag)
(prolog-electric-dot-flag)
(prolog-electric-dot-full-predicate-template)
(prolog-electric-underscore-flag, prolog-electric-tab-flag)
(prolog-electric-if-then-else-flag, prolog-electric-colon-flag)
(prolog-electric-dash-flag, prolog-old-sicstus-keys-flag)
(prolog-program-switches, prolog-prompt-regexp)
(prolog-debug-on-string, prolog-debug-off-string)
(prolog-trace-on-string, prolog-trace-off-string)
(prolog-zip-on-string, prolog-zip-off-string)
(prolog-use-standard-consult-compile-method-flag)
(prolog-use-prolog-tokenizer-flag, prolog-imenu-flag)
(prolog-imenu-max-lines, prolog-info-predicate-index)
(prolog-underscore-wordchar-flag, prolog-use-sicstus-sd)
(prolog-char-quote-workaround):
* progmodes/cc-vars.el (c-defun-tactic):
* net/tramp.el (tramp-encoding-command-interactive)
(tramp-local-end-of-line):
* net/soap-client.el (soap-client):
* net/netrc.el (netrc-file):
* net/gnutls.el (gnutls):
* minibuffer.el (completion-category-overrides)
(completion-cycle-threshold)
(completion-pcm-complete-word-inserts-delimiters):
* man.el (Man-name-local-regexp):
* mail/feedmail.el (feedmail-display-full-frame):
* international/characters.el (glyphless-char-display-control):
* eshell/em-ls.el (eshell-ls-date-format):
* emacs-lisp/cl-indent.el (lisp-lambda-list-keyword-alignment)
(lisp-lambda-list-keyword-parameter-indentation)
(lisp-lambda-list-keyword-parameter-alignment):
* doc-view.el (doc-view-image-width, doc-view-unoconv-program):
* dired-x.el (dired-omit-verbose):
* cus-theme.el (custom-theme-allow-multiple-selections):
* calc/calc.el (calc-highlight-selections-with-faces)
(calc-lu-field-reference, calc-lu-power-reference)
(calc-note-threshold):
* battery.el (battery-mode-line-limit):
* arc-mode.el (archive-7z-extract, archive-7z-expunge)
(archive-7z-update):
* allout.el (allout-prefixed-keybindings)
(allout-unprefixed-keybindings)
(allout-inhibit-auto-fill-on-headline)
(allout-flattened-numbering-abbreviation):
* allout-widgets.el (allout-widgets-auto-activation)
(allout-widgets-icons-dark-subdir)
(allout-widgets-icons-light-subdir, allout-widgets-icon-types)
(allout-widgets-theme-dark-background)
(allout-widgets-theme-light-background)
(allout-widgets-item-image-properties-emacs)
(allout-widgets-item-image-properties-xemacs)
(allout-widgets-run-unit-tests-on-load)
(allout-widgets-time-decoration-activity)
(allout-widgets-hook-error-post-time)
(allout-widgets-track-decoration):
* gnus/sieve-manage.el (sieve-manage-default-stream):
* gnus/shr.el (shr):
* gnus/nnir.el (nnir-ignored-newsgroups, nnir-summary-line-format)
(nnir-retrieve-headers-override-function)
(nnir-imap-default-search-key, nnir-notmuch-program)
(nnir-notmuch-additional-switches, nnir-notmuch-remove-prefix)
(nnir-method-default-engines):
* gnus/message.el (message-cite-reply-position):
* gnus/gssapi.el (gssapi-program):
* gnus/gravatar.el (gravatar):
* gnus/gnus-sum.el (gnus-refer-thread-use-nnir):
* gnus/gnus-registry.el (gnus-registry-unfollowed-addresses)
(gnus-registry-max-pruned-entries):
* gnus/gnus-picon.el (gnus-picon-inhibit-top-level-domains):
* gnus/gnus-int.el (gnus-after-set-mark-hook)
(gnus-before-update-mark-hook):
* gnus/gnus-async.el (gnus-async-post-fetch-function):
* gnus/auth-source.el (auth-source-cache-expiry):
Add missing :version tags to new defcustoms and defgroups.
2012-02-11 14:13:29 -08:00
|
|
|
|
:version "24.1"
|
2011-01-23 23:08:04 -06:00
|
|
|
|
:type '(string))
|
|
|
|
|
|
2011-11-15 18:37:37 +01:00
|
|
|
|
(defcustom calc-note-threshold "1"
|
* calc/calc-units.el (math-midi-round, math-freqp, math-midip)
(math-spnp, math-spn-to-midi, math-midi-to-spn, math-freq-to-spn)
(math-midi-to-freq, math-spn-to-freq, calcFunc-spn, calcFunc-midi)
(calcFunc-freq, calc-freq, calc-midi, calc-spn): New functions.
(math-notes): New variable.
* calc/calc.el (calc-note-threshold): New variable.
* calc/calc-ext.el (calc-init-extensions): Add keybindings for
calc-spn, calc-midi, calc-freq. Add autoloads for calcFunc-spn,
calcFunc-midi, calcFunc-freq, calc-spn, calc-midi and calc-freq.
* doc/misc/calc.tex (Musical Notes): New section.
(Customizing Calc): Mention calc-note-threshold.
2011-03-05 22:28:39 -06:00
|
|
|
|
"The number of cents that a frequency should be near a note
|
|
|
|
|
to be identified as that note."
|
Add missing :version tags to new defgroups and defcustoms
* window.el (window-sides-slots):
* tool-bar.el (tool-bar-position):
* term/xterm.el (xterm-extra-capabilities):
* ses.el (ses-self-reference-early-detection):
* progmodes/verilog-mode.el (verilog-auto-declare-nettype)
(verilog-auto-wire-type)
(verilog-auto-delete-trailing-whitespace)
(verilog-auto-reset-blocking-in-non, verilog-auto-inst-sort)
(verilog-auto-tieoff-declaration):
* progmodes/sql.el (sql-login-hook, sql-ansi-statement-starters)
(sql-oracle-statement-starters, sql-oracle-scan-on):
* progmodes/prolog.el (prolog-align-comments-flag)
(prolog-indent-mline-comments-flag, prolog-object-end-to-0-flag)
(prolog-left-indent-regexp, prolog-paren-indent-p)
(prolog-paren-indent, prolog-parse-mode, prolog-keywords)
(prolog-types, prolog-mode-specificators)
(prolog-determinism-specificators, prolog-directives)
(prolog-electric-newline-flag, prolog-hungry-delete-key-flag)
(prolog-electric-dot-flag)
(prolog-electric-dot-full-predicate-template)
(prolog-electric-underscore-flag, prolog-electric-tab-flag)
(prolog-electric-if-then-else-flag, prolog-electric-colon-flag)
(prolog-electric-dash-flag, prolog-old-sicstus-keys-flag)
(prolog-program-switches, prolog-prompt-regexp)
(prolog-debug-on-string, prolog-debug-off-string)
(prolog-trace-on-string, prolog-trace-off-string)
(prolog-zip-on-string, prolog-zip-off-string)
(prolog-use-standard-consult-compile-method-flag)
(prolog-use-prolog-tokenizer-flag, prolog-imenu-flag)
(prolog-imenu-max-lines, prolog-info-predicate-index)
(prolog-underscore-wordchar-flag, prolog-use-sicstus-sd)
(prolog-char-quote-workaround):
* progmodes/cc-vars.el (c-defun-tactic):
* net/tramp.el (tramp-encoding-command-interactive)
(tramp-local-end-of-line):
* net/soap-client.el (soap-client):
* net/netrc.el (netrc-file):
* net/gnutls.el (gnutls):
* minibuffer.el (completion-category-overrides)
(completion-cycle-threshold)
(completion-pcm-complete-word-inserts-delimiters):
* man.el (Man-name-local-regexp):
* mail/feedmail.el (feedmail-display-full-frame):
* international/characters.el (glyphless-char-display-control):
* eshell/em-ls.el (eshell-ls-date-format):
* emacs-lisp/cl-indent.el (lisp-lambda-list-keyword-alignment)
(lisp-lambda-list-keyword-parameter-indentation)
(lisp-lambda-list-keyword-parameter-alignment):
* doc-view.el (doc-view-image-width, doc-view-unoconv-program):
* dired-x.el (dired-omit-verbose):
* cus-theme.el (custom-theme-allow-multiple-selections):
* calc/calc.el (calc-highlight-selections-with-faces)
(calc-lu-field-reference, calc-lu-power-reference)
(calc-note-threshold):
* battery.el (battery-mode-line-limit):
* arc-mode.el (archive-7z-extract, archive-7z-expunge)
(archive-7z-update):
* allout.el (allout-prefixed-keybindings)
(allout-unprefixed-keybindings)
(allout-inhibit-auto-fill-on-headline)
(allout-flattened-numbering-abbreviation):
* allout-widgets.el (allout-widgets-auto-activation)
(allout-widgets-icons-dark-subdir)
(allout-widgets-icons-light-subdir, allout-widgets-icon-types)
(allout-widgets-theme-dark-background)
(allout-widgets-theme-light-background)
(allout-widgets-item-image-properties-emacs)
(allout-widgets-item-image-properties-xemacs)
(allout-widgets-run-unit-tests-on-load)
(allout-widgets-time-decoration-activity)
(allout-widgets-hook-error-post-time)
(allout-widgets-track-decoration):
* gnus/sieve-manage.el (sieve-manage-default-stream):
* gnus/shr.el (shr):
* gnus/nnir.el (nnir-ignored-newsgroups, nnir-summary-line-format)
(nnir-retrieve-headers-override-function)
(nnir-imap-default-search-key, nnir-notmuch-program)
(nnir-notmuch-additional-switches, nnir-notmuch-remove-prefix)
(nnir-method-default-engines):
* gnus/message.el (message-cite-reply-position):
* gnus/gssapi.el (gssapi-program):
* gnus/gravatar.el (gravatar):
* gnus/gnus-sum.el (gnus-refer-thread-use-nnir):
* gnus/gnus-registry.el (gnus-registry-unfollowed-addresses)
(gnus-registry-max-pruned-entries):
* gnus/gnus-picon.el (gnus-picon-inhibit-top-level-domains):
* gnus/gnus-int.el (gnus-after-set-mark-hook)
(gnus-before-update-mark-hook):
* gnus/gnus-async.el (gnus-async-post-fetch-function):
* gnus/auth-source.el (auth-source-cache-expiry):
Add missing :version tags to new defcustoms and defgroups.
2012-02-11 14:13:29 -08:00
|
|
|
|
:version "24.1"
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
:type 'string)
|
2011-01-23 23:08:04 -06:00
|
|
|
|
|
2012-11-18 02:20:04 +01:00
|
|
|
|
(defvar math-format-date-cache) ; calc-forms.el
|
|
|
|
|
|
2010-08-07 22:04:57 -05:00
|
|
|
|
(defface calc-nonselected-face
|
2011-11-15 18:37:37 +01:00
|
|
|
|
'((t :inherit shadow
|
2010-08-07 22:04:57 -05:00
|
|
|
|
:slant italic))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
"Face used to show the non-selected portion of a formula.")
|
2010-08-07 22:04:57 -05:00
|
|
|
|
|
|
|
|
|
(defface calc-selected-face
|
|
|
|
|
'((t :weight bold))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
"Face used to show the selected portion of a formula.")
|
2010-08-07 22:04:57 -05:00
|
|
|
|
|
2018-09-03 10:28:07 -07:00
|
|
|
|
(define-obsolete-variable-alias 'calc-bug-address 'report-emacs-bug-address
|
|
|
|
|
"26.2")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-scan-for-dels t
|
|
|
|
|
"If t, scan keymaps to find all DEL-like keys.
|
|
|
|
|
if nil, only DEL itself is mapped to calc-pop.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-stack '((top-of-stack 1 nil))
|
|
|
|
|
"Calculator stack.
|
|
|
|
|
Entries are 3-lists: Formula, Height (in lines), Selection (or nil).")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-stack-top 1
|
|
|
|
|
"Index into `calc-stack' of \"top\" of stack.
|
|
|
|
|
This is 1 unless `calc-truncate-stack' has been used.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
(defvar calc-display-sci-high 0
|
|
|
|
|
"Floating-point numbers with this positive exponent or higher above the
|
2021-09-22 20:26:40 +02:00
|
|
|
|
current precision are displayed in scientific notation in `calc-mode'.")
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
|
|
|
|
|
(defvar calc-display-sci-low -3
|
|
|
|
|
"Floating-point numbers with this negative exponent or lower are displayed
|
2021-09-22 20:26:40 +02:00
|
|
|
|
scientific notation in `calc-mode'.")
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
|
2021-04-27 17:36:15 +02:00
|
|
|
|
(defvar calc-digit-after-point nil
|
|
|
|
|
"If t, display at least one digit after the decimal point, as in `12.0'.
|
|
|
|
|
If nil, the decimal point may come last in a number, as in `12.'.
|
|
|
|
|
This setting only applies to floats in normal display mode.")
|
|
|
|
|
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
(defvar calc-other-modes nil
|
|
|
|
|
"List of used-defined strings to append to Calculator mode line.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
(defvar calc-Y-help-msgs nil
|
|
|
|
|
"List of strings for Y prefix help.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
(defvar calc-loaded-settings-file nil
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"Return t if `calc-settings-file' has been loaded yet.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
|
|
|
|
|
(defvar calc-mode-var-list '()
|
|
|
|
|
"List of variables used in customizing GNU Calc.")
|
|
|
|
|
|
|
|
|
|
(defmacro defcalcmodevar (var defval &optional doc)
|
2021-09-22 20:26:40 +02:00
|
|
|
|
"Declare VAR as a Calc variable, with default value DEFVAL and doc-string DOC.
|
2008-03-20 03:08:51 +00:00
|
|
|
|
The variable VAR will be added to `calc-mode-var-list'."
|
2021-09-26 20:56:36 +02:00
|
|
|
|
(declare (doc-string 3))
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
`(progn
|
|
|
|
|
(defvar ,var ,defval ,doc)
|
|
|
|
|
(add-to-list 'calc-mode-var-list (list (quote ,var) ,defval))))
|
|
|
|
|
|
|
|
|
|
(defun calc-mode-var-list-restore-default-values ()
|
2008-03-20 03:08:51 +00:00
|
|
|
|
"Restore the default values of the variables in `calc-mode-var-list'."
|
Don't quote lambdas with 'function' in calc/*.el
* lisp/calc/calc-aent.el (calc-do-quick-calc)
(calc-do-calc-eval, math-build-parse-table):
* lisp/calc/calc-alg.el (math-polynomial-base):
* lisp/calc/calc-alg.el (math-is-poly-rec):
* lisp/calc/calc-arith.el (calcFunc-scf):
* lisp/calc/calc-arith.el (math-ceiling, math-round):
* lisp/calc/calc-arith.el (math-trunc-fancy, math-floor-fancy):
* lisp/calc/calc-ext.el (calc-init-extensions, calc-reset)
(calc-refresh-top, calc-z-prefix-help, calc-binary-op-fancy)
(calc-unary-op-fancy):
* lisp/calc/calc-forms.el (math-make-mod):
* lisp/calc/calc-frac.el (calcFunc-frac):
* lisp/calc/calc-funcs.el (calcFunc-euler):
* lisp/calc/calc-help.el (calc-full-help):
* lisp/calc/calc-lang.el (c, pascal, fortran, tex, latex, eqn)
(yacas, maxima, giac, math, maple):
* lisp/calc/calc-macs.el (calc-wrapper, calc-slow-wrapper):
* lisp/calc/calc-map.el (calc-get-operator, calcFunc-mapeqr)
(calcFunc-reducea, calcFunc-rreducea, calcFunc-reduced)
(calcFunc-rreduced, calcFunc-outer):
* lisp/calc/calc-misc.el (another-calc, calc-do-handle-whys):
* lisp/calc/calc-mode.el (calc-save-modes):
* lisp/calc/calc-mtx.el (math-col-matrix, math-mul-mat-vec):
* lisp/calc/calc-poly.el (math-sort-terms, math-poly-div-list)
(math-mul-list, math-sort-poly-base-list)
(math-partial-fractions):
* lisp/calc/calc-prog.el (calc-user-define-formula):
* lisp/calc/calc-rewr.el (math-rewrite, math-compile-patterns)
(math-compile-rewrites, math-parse-schedule)
(math-rwcomp-pattern):
* lisp/calc/calc-store.el (calc-var-name-map, calc-let)
(calc-permanent-variable, calc-insert-variables):
* lisp/calc/calc-stuff.el (calc-flush-caches, calcFunc-pclean)
(calcFunc-pfrac):
* lisp/calc/calc-units.el (math-build-units-table)
(math-decompose-units):
* lisp/calc/calc-vec.el (calcFunc-mrow, math-mat-col)
(calcFunc-mcol, math-mat-less-col, math-mimic-ident):
* lisp/calc/calc-yank.el (calc-edit):
* lisp/calc/calc.el
(calc-mode-var-list-restore-default-values)
(calc-mode-var-list-restore-saved-values, calc-mode, calc-quit):
* lisp/calc/calccomp.el (math-compose-expr)
(math-compose-matrix, math-vector-to-string): Don't quote lambdas with
'function'.
2020-11-17 02:51:30 +01:00
|
|
|
|
(mapcar (lambda (v) (set (car v) (nth 1 v)))
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
calc-mode-var-list))
|
|
|
|
|
|
|
|
|
|
(defun calc-mode-var-list-restore-saved-values ()
|
2008-03-20 03:08:51 +00:00
|
|
|
|
"Restore the user-saved values of the variables in `calc-mode-var-list'."
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(let ((newvarlist '()))
|
|
|
|
|
(save-excursion
|
2005-01-10 04:07:04 +00:00
|
|
|
|
(let (pos
|
|
|
|
|
(file (substitute-in-file-name calc-settings-file)))
|
|
|
|
|
(when (and
|
|
|
|
|
(file-regular-p file)
|
|
|
|
|
(set-buffer (find-file-noselect file))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(search-forward ";;; Mode settings stored by Calc" nil t)
|
|
|
|
|
(progn
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(setq pos (point))
|
|
|
|
|
(search-forward "\n;;; End of mode settings" nil t)))
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(calc-mode-var-list-restore-default-values)
|
|
|
|
|
(eval-region pos (point))
|
|
|
|
|
(let ((varlist calc-mode-var-list))
|
|
|
|
|
(while varlist
|
|
|
|
|
(let ((var (car varlist)))
|
|
|
|
|
(setq newvarlist
|
|
|
|
|
(cons (list (car var) (symbol-value (car var)))
|
|
|
|
|
newvarlist)))
|
|
|
|
|
(setq varlist (cdr varlist)))))))
|
|
|
|
|
(if newvarlist
|
Don't quote lambdas with 'function' in calc/*.el
* lisp/calc/calc-aent.el (calc-do-quick-calc)
(calc-do-calc-eval, math-build-parse-table):
* lisp/calc/calc-alg.el (math-polynomial-base):
* lisp/calc/calc-alg.el (math-is-poly-rec):
* lisp/calc/calc-arith.el (calcFunc-scf):
* lisp/calc/calc-arith.el (math-ceiling, math-round):
* lisp/calc/calc-arith.el (math-trunc-fancy, math-floor-fancy):
* lisp/calc/calc-ext.el (calc-init-extensions, calc-reset)
(calc-refresh-top, calc-z-prefix-help, calc-binary-op-fancy)
(calc-unary-op-fancy):
* lisp/calc/calc-forms.el (math-make-mod):
* lisp/calc/calc-frac.el (calcFunc-frac):
* lisp/calc/calc-funcs.el (calcFunc-euler):
* lisp/calc/calc-help.el (calc-full-help):
* lisp/calc/calc-lang.el (c, pascal, fortran, tex, latex, eqn)
(yacas, maxima, giac, math, maple):
* lisp/calc/calc-macs.el (calc-wrapper, calc-slow-wrapper):
* lisp/calc/calc-map.el (calc-get-operator, calcFunc-mapeqr)
(calcFunc-reducea, calcFunc-rreducea, calcFunc-reduced)
(calcFunc-rreduced, calcFunc-outer):
* lisp/calc/calc-misc.el (another-calc, calc-do-handle-whys):
* lisp/calc/calc-mode.el (calc-save-modes):
* lisp/calc/calc-mtx.el (math-col-matrix, math-mul-mat-vec):
* lisp/calc/calc-poly.el (math-sort-terms, math-poly-div-list)
(math-mul-list, math-sort-poly-base-list)
(math-partial-fractions):
* lisp/calc/calc-prog.el (calc-user-define-formula):
* lisp/calc/calc-rewr.el (math-rewrite, math-compile-patterns)
(math-compile-rewrites, math-parse-schedule)
(math-rwcomp-pattern):
* lisp/calc/calc-store.el (calc-var-name-map, calc-let)
(calc-permanent-variable, calc-insert-variables):
* lisp/calc/calc-stuff.el (calc-flush-caches, calcFunc-pclean)
(calcFunc-pfrac):
* lisp/calc/calc-units.el (math-build-units-table)
(math-decompose-units):
* lisp/calc/calc-vec.el (calcFunc-mrow, math-mat-col)
(calcFunc-mcol, math-mat-less-col, math-mimic-ident):
* lisp/calc/calc-yank.el (calc-edit):
* lisp/calc/calc.el
(calc-mode-var-list-restore-default-values)
(calc-mode-var-list-restore-saved-values, calc-mode, calc-quit):
* lisp/calc/calccomp.el (math-compose-expr)
(math-compose-matrix, math-vector-to-string): Don't quote lambdas with
'function'.
2020-11-17 02:51:30 +01:00
|
|
|
|
(mapcar (lambda (v) (set (car v) (nth 1 v)))
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
newvarlist)
|
|
|
|
|
(calc-mode-var-list-restore-default-values))))
|
|
|
|
|
|
|
|
|
|
(defcalcmodevar calc-always-load-extensions nil
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
"If non-nil, load the calc-ext module automatically when Calc is loaded.")
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
|
|
|
|
|
(defcalcmodevar calc-line-numbering t
|
|
|
|
|
"If non-nil, display line numbers in Calculator stack.")
|
|
|
|
|
|
|
|
|
|
(defcalcmodevar calc-line-breaking t
|
|
|
|
|
"If non-nil, break long values across multiple lines in Calculator stack.")
|
|
|
|
|
|
|
|
|
|
(defcalcmodevar calc-display-just nil
|
|
|
|
|
"If nil, stack display is left-justified.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If `right', stack display is right-justified.
|
|
|
|
|
If `center', stack display is centered.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-display-origin nil
|
|
|
|
|
"Horizontal origin of displayed stack entries.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
In left-justified mode, this is effectively indentation. (Default 0).
|
|
|
|
|
In right-justified mode, this is effectively window width.
|
|
|
|
|
In centered mode, center of stack entry is placed here.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-number-radix 10
|
|
|
|
|
"Radix for entry and display of numbers in calc-mode, 2-36.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-leading-zeros nil
|
|
|
|
|
"If non-nil, leading zeros are provided to pad integers to calc-word-size.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-group-digits nil
|
|
|
|
|
"If non-nil, group digits in large displayed integers by inserting spaces.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If an integer, group that many digits at a time.
|
|
|
|
|
If t, use 4 for binary and hex, 3 otherwise.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-group-char ","
|
|
|
|
|
"The character (in the form of a string) to be used for grouping digits.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
This is used only when calc-group-digits mode is on.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-point-char "."
|
|
|
|
|
"The character (in the form of a string) to be used as a decimal point.")
|
2007-09-26 00:09:32 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-frac-format '(":" nil)
|
|
|
|
|
"Format of displayed fractions; a string of one or two of \":\" or \"/\".")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-prefer-frac nil
|
|
|
|
|
"If non-nil, prefer fractional over floating-point results.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-hms-format "%s@ %s' %s\""
|
|
|
|
|
"Format of displayed hours-minutes-seconds angles, a format string.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
String must contain three %s marks for hours, minutes, seconds respectively.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-date-format '((H ":" mm C SS pp " ")
|
|
|
|
|
Www " " Mmm " " D ", " YYYY)
|
|
|
|
|
"Format of displayed date forms.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-float-format '(float 0)
|
|
|
|
|
"Format to use for display of floating-point numbers in calc-mode.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
Must be a list of one of the following forms:
|
|
|
|
|
(float 0) Floating point format, display full precision.
|
|
|
|
|
(float N) N > 0: Floating point format, at most N significant figures.
|
|
|
|
|
(float -N) -N < 0: Floating point format, calc-internal-prec - N figs.
|
|
|
|
|
(fix N) N >= 0: Fixed point format, N places after decimal point.
|
|
|
|
|
(sci 0) Scientific notation, full precision.
|
|
|
|
|
(sci N) N > 0: Scientific notation, N significant figures.
|
|
|
|
|
(sci -N) -N < 0: Scientific notation, calc-internal-prec - N figs.
|
|
|
|
|
(eng 0) Engineering notation, full precision.
|
|
|
|
|
(eng N) N > 0: Engineering notation, N significant figures.
|
|
|
|
|
(eng -N) -N < 0: Engineering notation, calc-internal-prec - N figs.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-full-float-format '(float 0)
|
|
|
|
|
"Format to use when full precision must be displayed.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-complex-format nil
|
|
|
|
|
"Format to use for display of complex numbers in calc-mode. Must be one of:
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
nil Use (x, y) form.
|
|
|
|
|
i Use x + yi form.
|
|
|
|
|
j Use x + yj form.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-complex-mode 'cplx
|
|
|
|
|
"Preferred form, either `cplx' or `polar', for complex numbers.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-infinite-mode nil
|
|
|
|
|
"If nil, 1 / 0 is left unsimplified.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If 0, 1 / 0 is changed to inf (zeros are considered positive).
|
|
|
|
|
Otherwise, 1 / 0 is changed to uinf (undirected infinity).")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-display-strings nil
|
|
|
|
|
"If non-nil, display vectors of byte-sized integers as strings.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-matrix-just 'center
|
|
|
|
|
"If nil, vector elements are left-justified.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If `right', vector elements are right-justified.
|
|
|
|
|
If `center', vector elements are centered.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-break-vectors nil
|
|
|
|
|
"If non-nil, display vectors one element per line.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-full-vectors t
|
|
|
|
|
"If non-nil, display long vectors in full. If nil, use abbreviated form.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-full-trail-vectors t
|
|
|
|
|
"If non-nil, display long vectors in full in the trail.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-vector-commas ","
|
|
|
|
|
"If non-nil, separate elements of displayed vectors with this string.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-vector-brackets "[]"
|
|
|
|
|
"If non-nil, surround displayed vectors with these characters.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-matrix-brackets '(R O)
|
|
|
|
|
"A list of code-letter symbols that control \"big\" matrix display.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If `R' is present, display inner brackets for matrices.
|
|
|
|
|
If `O' is present, display outer brackets for matrices (above/below).
|
|
|
|
|
If `C' is present, display outer brackets for matrices (centered).")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-language nil
|
|
|
|
|
"Language or format for entry and display of stack values. Must be one of:
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
nil Use standard Calc notation.
|
|
|
|
|
flat Use standard Calc notation, one-line format.
|
|
|
|
|
big Display formulas in 2-d notation (enter w/std notation).
|
|
|
|
|
unform Use unformatted display: add(a, mul(b,c)).
|
|
|
|
|
c Use C language notation.
|
|
|
|
|
pascal Use Pascal language notation.
|
|
|
|
|
fortran Use Fortran language notation.
|
|
|
|
|
tex Use TeX notation.
|
2005-01-31 06:29:39 +00:00
|
|
|
|
latex Use LaTeX notation.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
eqn Use eqn notation.
|
2007-12-29 00:54:16 +00:00
|
|
|
|
yacas Use Yacas notation.
|
|
|
|
|
maxima Use Maxima notation.
|
|
|
|
|
giac Use Giac notation.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
math Use Mathematica(tm) notation.
|
|
|
|
|
maple Use Maple notation.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-language-option nil
|
|
|
|
|
"Numeric prefix argument for the command that set `calc-language'.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-left-label ""
|
|
|
|
|
"Label to display at left of formula.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-right-label ""
|
|
|
|
|
"Label to display at right of formula.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-word-size 32
|
|
|
|
|
"Minimum number of bits per word, if any, for binary operations in calc-mode.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-previous-modulo nil
|
|
|
|
|
"Most recently used value of M in a modulo form.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2012-07-29 18:19:09 -05:00
|
|
|
|
(defcalcmodevar calc-simplify-mode 'alg
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
"Type of simplification applied to results.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If `none', results are not simplified when pushed on the stack.
|
|
|
|
|
If `num', functions are simplified only when args are constant.
|
2012-07-29 18:19:09 -05:00
|
|
|
|
If nil, only limited simplifications are applied.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If `binary', `math-clip' is applied if appropriate.
|
|
|
|
|
If `alg', `math-simplify' is applied.
|
|
|
|
|
If `ext', `math-simplify-extended' is applied.
|
|
|
|
|
If `units', `math-simplify-units' is applied.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-auto-recompute t
|
|
|
|
|
"If non-nil, recompute evalto's automatically when necessary.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-display-raw nil
|
2005-01-18 18:30:39 +00:00
|
|
|
|
"If non-nil, display shows unformatted Lisp exprs. (For debugging)")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-internal-prec 12
|
|
|
|
|
"Number of digits of internal precision for calc-mode calculations.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-angle-mode 'deg
|
|
|
|
|
"If deg, angles are in degrees; if rad, angles are in radians.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If hms, angles are in degrees-minutes-seconds.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-algebraic-mode nil
|
|
|
|
|
"If non-nil, numeric entry accepts whole algebraic expressions.
|
2015-08-28 22:24:10 -07:00
|
|
|
|
If nil, algebraic expressions must be preceded by \"\\='\".")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-incomplete-algebraic-mode nil
|
|
|
|
|
"Like calc-algebraic-mode except only affects ( and [ keys.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-symbolic-mode nil
|
|
|
|
|
"If non-nil, inexact numeric computations like sqrt(2) are postponed.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If nil, computations on numbers always yield numbers where possible.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-matrix-mode nil
|
|
|
|
|
"If `matrix', variables are assumed to be matrix-valued.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If a number, variables are assumed to be NxN matrices.
|
2020-12-19 17:26:58 +01:00
|
|
|
|
If `sqmatrix', variables are assumed to be square matrices of an
|
|
|
|
|
unspecified size.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If `scalar', variables are assumed to be scalar-valued.
|
|
|
|
|
If nil, symbolic math routines make no assumptions about variables.")
|
|
|
|
|
|
2009-11-20 00:54:19 +00:00
|
|
|
|
(defcalcmodevar calc-twos-complement-mode nil
|
|
|
|
|
"If non-nil, display integers in two's complement mode.")
|
2009-11-15 23:55:53 +00:00
|
|
|
|
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-shift-prefix nil
|
|
|
|
|
"If non-nil, shifted letter keys are prefix keys rather than normal meanings.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-window-height 7
|
|
|
|
|
"Initial height of Calculator window.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-display-trail t
|
2021-09-24 20:59:32 +02:00
|
|
|
|
"If non-nil, \\[calc] creates a window to display Calculator trail.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-show-selections t
|
|
|
|
|
"If non-nil, selected sub-formulas are shown by obscuring rest of formula.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If nil, selected sub-formulas are highlighted by obscuring the sub-formulas.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-use-selections t
|
|
|
|
|
"If non-nil, commands operate only on selected portions of formulas.
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
If nil, selections displayed but ignored.")
|
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-assoc-selections t
|
|
|
|
|
"If non-nil, selection hides deep structure of associative formulas.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-display-working-message 'lots
|
|
|
|
|
"If non-nil, display \"Working...\" for potentially slow Calculator commands.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-auto-why 'maybe
|
|
|
|
|
"If non-nil, automatically execute a \"why\" command to explain odd results.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-timing nil
|
|
|
|
|
"If non-nil, display timing information on each slow command.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-mode-save-mode 'local)
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
(defcalcmodevar calc-standard-date-formats
|
|
|
|
|
'("N"
|
2004-09-20 18:35:40 +00:00
|
|
|
|
"<H:mm:SSpp >Www Mmm D, YYYY"
|
|
|
|
|
"D Mmm YYYY<, h:mm:SS>"
|
|
|
|
|
"Www Mmm BD< hh:mm:ss> YYYY"
|
|
|
|
|
"M/D/Y< H:mm:SSpp>"
|
|
|
|
|
"D.M.Y< h:mm:SS>"
|
|
|
|
|
"M-D-Y< H:mm:SSpp>"
|
|
|
|
|
"D-M-Y< h:mm:SS>"
|
|
|
|
|
"j<, h:mm:SS>"
|
2012-12-10 20:29:21 -06:00
|
|
|
|
"YYddd< hh:mm:ss>"
|
|
|
|
|
"ZYYY-MM-DD Www< hh:mm>"
|
2012-12-15 20:52:11 -06:00
|
|
|
|
"IYYY-Iww-w<Thh:mm:ss>"))
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
2008-03-20 03:08:51 +00:00
|
|
|
|
(defcalcmodevar calc-autorange-units nil
|
|
|
|
|
"If non-nil, automatically set unit prefixes to keep units in a reasonable range.")
|
2007-09-26 00:09:32 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-was-keypad-mode nil
|
|
|
|
|
"Non-nil if Calc was last invoked in keypad mode.")
|
2007-09-26 00:09:32 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-full-mode nil
|
|
|
|
|
"Non-nil if Calc was last invoked in full-screen mode.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-user-parse-tables nil
|
|
|
|
|
"Alist of languages with user-defined parse rules.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-gnuplot-default-device "default"
|
|
|
|
|
"The default device name for GNUPLOT plotting.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-gnuplot-default-output "STDOUT"
|
|
|
|
|
"The default output file for GNUPLOT plotting.")
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-gnuplot-print-device "postscript"
|
|
|
|
|
"The default device name for GNUPLOT printing.")
|
2007-09-26 00:09:32 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-gnuplot-print-output "auto"
|
|
|
|
|
"The default output for GNUPLOT printing.")
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-gnuplot-geometry nil
|
|
|
|
|
"The default geometry for the GNUPLOT window.")
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-graph-default-resolution 15
|
|
|
|
|
"The default number of data points when plotting curves.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-graph-default-resolution-3d 5
|
|
|
|
|
"The default number of x- and y- data points when plotting surfaces.")
|
2007-09-26 00:09:32 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defcalcmodevar calc-invocation-macro nil
|
|
|
|
|
"A user defined macro for starting Calc.
|
|
|
|
|
Used by `calc-user-invocation'.")
|
(defcalcmodevar): New macro.
(calc-mode-var-list-restore-default-values,
calc-mode-var-list-restore-saved-values): New functions.
(calc-mode-var-list): Use defcalcmodevar to define it.
(calc-always-load-extensions, calc-line-numbering)
(calc-line-breaking, calc-display-just, calc-display-origin)
(calc-number-radix, calc-leading-zeros, calc-group-digits)
(calc-group-char, calc-point-char, calc-frac-format)
(calc-prefer-frac, calc-hms-format, calc-date-format)
(calc-float-format, calc-full-float-format, calc-complex-format)
(calc-complex-mode, calc-infinite-mode, calc-display-strings)
(calc-matrix-just, calc-break-vectors, calc-full-vectors)
(calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets)
(calc-matrix-brackets, calc-language, calc-language-option)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections, calc-display-working-message)
(calc-auto-why, calc-timing, calc-mode-save-mode)
(calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode)
(calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Use defcalcmodevar to
declare them and set their default values.
2005-01-09 15:48:20 +00:00
|
|
|
|
|
|
|
|
|
(defcalcmodevar calc-show-banner t
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"If non-nil, show a friendly greeting above the stack.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defconst calc-local-var-list '(calc-stack
|
|
|
|
|
calc-stack-top
|
|
|
|
|
calc-undo-list
|
|
|
|
|
calc-redo-list
|
|
|
|
|
calc-always-load-extensions
|
|
|
|
|
calc-mode-save-mode
|
|
|
|
|
calc-display-raw
|
|
|
|
|
calc-line-numbering
|
|
|
|
|
calc-line-breaking
|
|
|
|
|
calc-display-just
|
|
|
|
|
calc-display-origin
|
|
|
|
|
calc-left-label
|
|
|
|
|
calc-right-label
|
|
|
|
|
calc-auto-why
|
|
|
|
|
calc-algebraic-mode
|
|
|
|
|
calc-incomplete-algebraic-mode
|
|
|
|
|
calc-symbolic-mode
|
|
|
|
|
calc-matrix-mode
|
|
|
|
|
calc-inverse-flag
|
|
|
|
|
calc-hyperbolic-flag
|
2010-04-16 21:47:25 -05:00
|
|
|
|
calc-option-flag
|
2001-11-06 18:59:06 +00:00
|
|
|
|
calc-keep-args-flag
|
|
|
|
|
calc-angle-mode
|
|
|
|
|
calc-number-radix
|
|
|
|
|
calc-leading-zeros
|
|
|
|
|
calc-group-digits
|
|
|
|
|
calc-group-char
|
|
|
|
|
calc-point-char
|
|
|
|
|
calc-frac-format
|
|
|
|
|
calc-prefer-frac
|
|
|
|
|
calc-hms-format
|
|
|
|
|
calc-date-format
|
|
|
|
|
calc-standard-date-formats
|
|
|
|
|
calc-float-format
|
|
|
|
|
calc-full-float-format
|
|
|
|
|
calc-complex-format
|
|
|
|
|
calc-matrix-just
|
|
|
|
|
calc-full-vectors
|
|
|
|
|
calc-full-trail-vectors
|
|
|
|
|
calc-break-vectors
|
|
|
|
|
calc-vector-commas
|
|
|
|
|
calc-vector-brackets
|
|
|
|
|
calc-matrix-brackets
|
|
|
|
|
calc-complex-mode
|
|
|
|
|
calc-infinite-mode
|
|
|
|
|
calc-display-strings
|
|
|
|
|
calc-simplify-mode
|
|
|
|
|
calc-auto-recompute
|
|
|
|
|
calc-autorange-units
|
|
|
|
|
calc-show-plain
|
|
|
|
|
calc-show-selections
|
|
|
|
|
calc-use-selections
|
|
|
|
|
calc-assoc-selections
|
|
|
|
|
calc-word-size
|
|
|
|
|
calc-internal-prec))
|
|
|
|
|
|
2004-11-09 04:43:03 +00:00
|
|
|
|
(defvar calc-mode-hook nil
|
|
|
|
|
"Hook run when entering calc-mode.")
|
|
|
|
|
|
|
|
|
|
(defvar calc-trail-mode-hook nil
|
|
|
|
|
"Hook run when entering calc-trail-mode.")
|
|
|
|
|
|
|
|
|
|
(defvar calc-start-hook nil
|
|
|
|
|
"Hook run when calc is started.")
|
|
|
|
|
|
|
|
|
|
(defvar calc-end-hook nil
|
|
|
|
|
"Hook run when calc is quit.")
|
|
|
|
|
|
|
|
|
|
(defvar calc-load-hook nil
|
|
|
|
|
"Hook run when calc.el is loaded.")
|
2020-01-16 23:06:04 -08:00
|
|
|
|
(make-obsolete-variable 'calc-load-hook
|
|
|
|
|
"use `with-eval-after-load' instead." "28.1")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2005-05-30 21:03:51 +00:00
|
|
|
|
(defvar calc-window-hook nil
|
|
|
|
|
"Hook called to create the Calc window.")
|
|
|
|
|
|
|
|
|
|
(defvar calc-trail-window-hook nil
|
|
|
|
|
"Hook called to create the Calc trail window.")
|
|
|
|
|
|
2005-07-09 03:41:40 +00:00
|
|
|
|
(defvar calc-embedded-new-buffer-hook nil
|
|
|
|
|
"Hook run when starting embedded mode in a new buffer.")
|
|
|
|
|
|
|
|
|
|
(defvar calc-embedded-new-formula-hook nil
|
|
|
|
|
"Hook run when starting embedded mode in a new formula.")
|
|
|
|
|
|
|
|
|
|
(defvar calc-embedded-mode-hook nil
|
|
|
|
|
"Hook run when starting embedded mode.")
|
|
|
|
|
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
;; The following modes use specially-formatted data.
|
|
|
|
|
(put 'calc-mode 'mode-class 'special)
|
2003-02-04 13:24:35 +00:00
|
|
|
|
|
* lisp/subr.el (define-error): New function.
* doc/lispref/control.texi (Signaling Errors): Refer to define-error.
(Error Symbols): Add `define-error'.
* doc/lispref/errors.texi (Standard Errors): Don't refer to `error-conditions'.
* lisp/progmodes/ada-xref.el (ada-error-file-not-found): Rename from
error-file-not-found and define with define-error.
* lisp/emacs-lisp/cl-lib.el (cl-assertion-failed): Move here from subr.el
and define with define-error.
* lisp/userlock.el (file-locked, file-supersession):
* lisp/simple.el (mark-inactive):
* lisp/progmodes/js.el (js-moz-bad-rpc, js-js-error):
* lisp/progmodes/ada-mode.el (ada-mode-errors):
* lisp/play/life.el (life-extinct):
* lisp/nxml/xsd-regexp.el (xsdre-invalid-regexp, xsdre-parse-error):
* lisp/nxml/xmltok.el (xmltok-markup-declaration-parse-error):
* lisp/nxml/rng-util.el (rng-error):
* lisp/nxml/rng-uri.el (rng-uri-error):
* lisp/nxml/rng-match.el (rng-compile-error):
* lisp/nxml/rng-cmpct.el (rng-c-incorrect-schema):
* lisp/nxml/nxml-util.el (nxml-error, nxml-file-parse-error):
* lisp/nxml/nxml-rap.el (nxml-scan-error):
* lisp/nxml/nxml-outln.el (nxml-outline-error):
* lisp/net/soap-client.el (soap-error):
* lisp/net/gnutls.el (gnutls-error):
* lisp/net/ange-ftp.el (ftp-error):
* lisp/mpc.el (mpc-proc-error):
* lisp/json.el (json-error, json-readtable-error, json-unknown-keyword)
(json-number-format, json-string-escape, json-string-format)
(json-key-format, json-object-format):
* lisp/jka-compr.el (compression-error):
* lisp/international/quail.el (quail-error):
* lisp/international/kkc.el (kkc-error):
* lisp/emacs-lisp/ert.el (ert-test-failed):
* lisp/calc/calc.el (calc-error, inexact-result, math-overflow)
(math-underflow):
* lisp/bookmark.el (bookmark-error-no-filename):
* lisp/epg.el (epg-error): Define with define-error.
2013-08-09 17:22:44 -04:00
|
|
|
|
(define-error 'calc-error "Calc internal error")
|
|
|
|
|
(define-error 'inexact-result
|
|
|
|
|
"Calc internal error (inexact-result)" 'calc-error)
|
|
|
|
|
|
|
|
|
|
(define-error 'math-overflow "Floating-point overflow occurred" 'calc-error)
|
|
|
|
|
(define-error 'math-underflow "Floating-point underflow occurred" 'calc-error)
|
2003-02-04 13:24:35 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-trail-pointer nil
|
|
|
|
|
"The \"current\" entry in trail buffer.")
|
|
|
|
|
(defvar calc-trail-overlay nil
|
2021-09-22 20:26:40 +02:00
|
|
|
|
"The value of `overlay-arrow-string'.")
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-undo-list nil
|
|
|
|
|
"The list of previous operations for undo.")
|
|
|
|
|
(defvar calc-redo-list nil
|
|
|
|
|
"The list of recent undo operations.")
|
|
|
|
|
(defvar calc-main-buffer nil
|
|
|
|
|
"A pointer to Calculator buffer.")
|
2009-03-30 02:19:07 +00:00
|
|
|
|
(defvar calc-buffer-list nil
|
|
|
|
|
"A list of all Calc buffers.")
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-trail-buffer nil
|
|
|
|
|
"A pointer to Calc Trail buffer.")
|
|
|
|
|
(defvar calc-why nil
|
|
|
|
|
"Explanations of most recent errors.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-next-why nil)
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
(defvar calc-inverse-flag nil
|
|
|
|
|
"If non-nil, next operation is Inverse.")
|
|
|
|
|
(defvar calc-hyperbolic-flag nil
|
|
|
|
|
"If non-nil, next operation is Hyperbolic.")
|
2010-04-16 21:47:25 -05:00
|
|
|
|
(defvar calc-option-flag nil
|
|
|
|
|
"If non-nil, next operation has Optional behavior.")
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
(defvar calc-keep-args-flag nil
|
|
|
|
|
"If non-nil, next operation should not remove its arguments from stack.")
|
|
|
|
|
(defvar calc-function-open "("
|
|
|
|
|
"Open-parenthesis string for function call notation.")
|
|
|
|
|
(defvar calc-function-close ")"
|
|
|
|
|
"Close-parenthesis string for function call notation.")
|
|
|
|
|
(defvar calc-language-output-filter nil
|
|
|
|
|
"Function through which to pass strings after formatting.")
|
|
|
|
|
(defvar calc-language-input-filter nil
|
|
|
|
|
"Function through which to pass strings before parsing.")
|
|
|
|
|
(defvar calc-radix-formatter nil
|
|
|
|
|
"Formatting function used for non-decimal numbers.")
|
2007-12-02 03:16:05 +00:00
|
|
|
|
(defvar calc-lang-slash-idiv nil
|
|
|
|
|
"A list of languages in which / might represent integer division.")
|
|
|
|
|
(defvar calc-lang-allow-underscores nil
|
|
|
|
|
"A list of languages which allow underscores in variable names.")
|
2007-12-26 16:04:00 +00:00
|
|
|
|
(defvar calc-lang-allow-percentsigns nil
|
|
|
|
|
"A list of languages which allow percent signs in variable names.")
|
2007-12-02 03:16:05 +00:00
|
|
|
|
(defvar calc-lang-c-type-hex nil
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"Languages in which octal and hex numbers are written with leading 0 and 0x.")
|
2007-12-02 03:16:05 +00:00
|
|
|
|
(defvar calc-lang-brackets-are-subscripts nil
|
|
|
|
|
"Languages in which subscripts are indicated by brackets.")
|
|
|
|
|
(defvar calc-lang-parens-are-subscripts nil
|
|
|
|
|
"Languages in which subscripts are indicated by parentheses.")
|
calc/calc.el (calc-mode-var-list): Define this variable.
(calc-always-load-extensions, calc-line-numbering,
calc-line-breaking, calc-display-just, calc-display-origin,
calc-number-radix, calc-leading-zeros, calc-group-digits,
calc-group-char, calc-point-char, calc-frac-format,
calc-prefer-frac, calc-hms-format, calc-date-format,
calc-float-format, calc-full-float-format, calc-complex-format,
calc-complex-mode, calc-infinite-mode, calc-display-strings,
calc-matrix-just, calc-break-vectors, calc-full-vectors,
calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets,
calc-matrix-brackets, calc-language, calc-language-option,
calc-left-label, calc-right-label, calc-word-size,
calc-previous-modulo, calc-simplify-mode, calc-auto-recompute,
calc-display-raw, calc-internal-prec, calc-angle-mode,
calc-algebraic-mode, calc-incomplete-algebraic-mode,
calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix,
calc-window-height, calc-display-trail, calc-show-selections,
calc-use-selections, calc-assoc-selections,
calc-display-working-message, calc-auto-why , calc-timing,
calc-mode-save-mode, calc-standard-date-formats,
calc-autorange-units, calc-was-keypad-mode, calc-full-mode,
calc-user-parse-tables, calc-gnuplot-default-device,
calc-gnuplot-default-output, calc-gnuplot-print-device,
calc-gnuplot-print-output, calc-gnuplot-geometry,
calc-graph-default-resolution, calc-graph-default-resolution-3d,
calc-invocation-macro, calc-show-banner): Give these values as
part of `calc-mode-var-list's initialization after the variables
are declared with defvar.
2004-09-15 16:48:19 +00:00
|
|
|
|
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-last-kill nil
|
|
|
|
|
"The last number killed in calc-mode.")
|
|
|
|
|
(defvar calc-dollar-values nil
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 08:41:44 -07:00
|
|
|
|
"Values to be used for `$'.")
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-dollar-used nil
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 08:41:44 -07:00
|
|
|
|
"The highest order of `$' that occurred.")
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-hashes-used nil
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 08:41:44 -07:00
|
|
|
|
"The highest order of `#' that occurred.")
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-quick-prev-results nil
|
|
|
|
|
"Previous results from Quick Calc.")
|
|
|
|
|
(defvar calc-said-hello nil
|
2011-11-22 23:03:56 -08:00
|
|
|
|
"Non-nil if the welcome message has been displayed.")
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-executing-macro nil
|
|
|
|
|
"Non-nil if a keyboard macro is executing from the \"K\" key.")
|
|
|
|
|
(defvar calc-any-selections nil
|
|
|
|
|
"Non-nil if there are selections present.")
|
|
|
|
|
(defvar calc-help-phase 0
|
|
|
|
|
"The number of consecutive \"?\" keystrokes.")
|
|
|
|
|
(defvar calc-full-help-flag nil
|
|
|
|
|
"Non-nil if `calc-full-help' is being executed.")
|
|
|
|
|
(defvar calc-refresh-count 0
|
|
|
|
|
"The number of `calc-refresh' calls.")
|
|
|
|
|
(defvar calc-display-dirty nil
|
|
|
|
|
"Non-nil if the stack display might not reflect the latest mode settings.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-prepared-composition nil)
|
|
|
|
|
(defvar calc-selection-cache-default-entry nil)
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar calc-embedded-info nil
|
|
|
|
|
"If non-nil, a vector consisting of information for embedded mode.")
|
|
|
|
|
(defvar calc-embedded-active nil
|
|
|
|
|
"Alist of buffers with sorted lists of calc-embedded-infos.")
|
|
|
|
|
(defvar calc-standalone-flag nil
|
|
|
|
|
"Non-nil if Emacs started with standalone Calc.")
|
|
|
|
|
(defvar var-EvalRules nil
|
|
|
|
|
"User defined rules that Calc will apply automatically.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar math-eval-rules-cache-tag t)
|
|
|
|
|
(defvar math-radix-explicit-format t)
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
(defvar math-expr-function-mapping nil
|
|
|
|
|
"Alist of language specific functions with Calc functions.")
|
|
|
|
|
(defvar math-expr-variable-mapping nil
|
|
|
|
|
"Alist of language specific variables with Calc variables.")
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar math-read-expr-quotes nil)
|
|
|
|
|
(defvar math-working-step nil)
|
|
|
|
|
(defvar math-working-step-2 nil)
|
|
|
|
|
(defvar var-i '(special-const (math-imaginary 1)))
|
|
|
|
|
(defvar var-pi '(special-const (math-pi)))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(defvar var-π '(special-const (math-pi)))
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar var-e '(special-const (math-e)))
|
|
|
|
|
(defvar var-phi '(special-const (math-phi)))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(defvar var-φ '(special-const (math-phi)))
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar var-gamma '(special-const (math-gamma-const)))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(defvar var-γ '(special-const (math-gamma-const)))
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar var-Modes '(special-const (math-get-modes-vec)))
|
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(mapc (lambda (v) (or (boundp v) (set v nil)))
|
|
|
|
|
calc-local-var-list)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(defvar calc-mode-map
|
|
|
|
|
(let ((map (make-keymap)))
|
|
|
|
|
(suppress-keymap map t)
|
|
|
|
|
(define-key map "+" 'calc-plus)
|
|
|
|
|
(define-key map "-" 'calc-minus)
|
|
|
|
|
(define-key map "*" 'calc-times)
|
|
|
|
|
(define-key map "/" 'calc-divide)
|
|
|
|
|
(define-key map "%" 'calc-mod)
|
|
|
|
|
(define-key map "&" 'calc-inv)
|
|
|
|
|
(define-key map "^" 'calc-power)
|
|
|
|
|
(define-key map "\M-%" 'calc-percent)
|
|
|
|
|
(define-key map "e" 'calcDigit-start)
|
|
|
|
|
(define-key map "i" 'calc-info)
|
|
|
|
|
(define-key map "n" 'calc-change-sign)
|
|
|
|
|
(define-key map "q" 'calc-quit)
|
|
|
|
|
(define-key map "Y" 'nil)
|
|
|
|
|
(define-key map "Y?" 'calc-shift-Y-prefix-help)
|
|
|
|
|
(define-key map "?" 'calc-help)
|
|
|
|
|
(define-key map " " 'calc-enter)
|
|
|
|
|
(define-key map "'" 'calc-algebraic-entry)
|
|
|
|
|
(define-key map "$" 'calc-auto-algebraic-entry)
|
|
|
|
|
(define-key map "\"" 'calc-auto-algebraic-entry)
|
|
|
|
|
(define-key map "\t" 'calc-roll-down)
|
|
|
|
|
(define-key map "\M-\t" 'calc-roll-up)
|
2009-07-29 03:42:49 +00:00
|
|
|
|
(define-key map "\C-x\C-t" 'calc-transpose-lines)
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(define-key map "\C-m" 'calc-enter)
|
|
|
|
|
(define-key map "\M-\C-m" 'calc-last-args-stub)
|
|
|
|
|
(define-key map "\C-j" 'calc-over)
|
|
|
|
|
(define-key map "\C-y" 'calc-yank)
|
|
|
|
|
(define-key map [mouse-2] 'calc-yank)
|
2011-01-20 22:54:37 -06:00
|
|
|
|
(define-key map [remap undo] 'calc-undo)
|
2008-09-02 08:49:49 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(mapc (lambda (x) (define-key map (char-to-string x) 'undefined))
|
|
|
|
|
"lOW")
|
|
|
|
|
(mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key))
|
2010-04-17 22:09:18 -05:00
|
|
|
|
(concat "ABCDEFGHIJKLMNOPQRSTUVXZabcdfghjkmoprstuvwxyz"
|
2011-03-09 17:38:16 -06:00
|
|
|
|
":\\|!()[]<>{},;=~`\C-k\C-w"))
|
2008-06-24 05:21:40 +00:00
|
|
|
|
(define-key map "\M-w" 'calc-missing-key)
|
|
|
|
|
(define-key map "\M-k" 'calc-missing-key)
|
|
|
|
|
(define-key map "\M-\C-w" 'calc-missing-key)
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(mapc (lambda (x) (define-key map (char-to-string x) 'calcDigit-start))
|
|
|
|
|
"_0123456789.#@")
|
|
|
|
|
map)
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
"The key map for Calc.")
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(defvar calc-digit-map
|
|
|
|
|
(let ((map (make-keymap)))
|
2009-08-30 05:12:46 +00:00
|
|
|
|
(map-keymap (lambda (key bind)
|
|
|
|
|
(define-key map (vector key)
|
|
|
|
|
(if (eq bind 'undefined)
|
|
|
|
|
'undefined 'calcDigit-nondigit)))
|
|
|
|
|
calc-mode-map)
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(mapc (lambda (x) (define-key map (char-to-string x) 'calcDigit-key))
|
|
|
|
|
"_0123456789.e+-:n#@oh'\"mspM")
|
|
|
|
|
(mapc (lambda (x) (define-key map (char-to-string x) 'calcDigit-letter))
|
|
|
|
|
"abcdfgijklqrtuvwxyzABCDEFGHIJKLNOPQRSTUVWXYZ")
|
|
|
|
|
(define-key map "'" 'calcDigit-algebraic)
|
|
|
|
|
(define-key map "`" 'calcDigit-edit)
|
|
|
|
|
(define-key map "\C-g" 'abort-recursive-edit)
|
|
|
|
|
map)
|
|
|
|
|
"The key map for entering Calc digits.")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(mapc (lambda (x)
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(ignore-errors
|
|
|
|
|
(define-key calc-digit-map x 'calcDigit-backspace)
|
|
|
|
|
(define-key calc-mode-map x 'calc-pop)
|
2019-06-19 22:56:26 +02:00
|
|
|
|
(define-key calc-mode-map (vconcat "\e" x) 'calc-pop-above)))
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(if calc-scan-for-dels
|
|
|
|
|
(append (where-is-internal 'delete-backward-char global-map)
|
|
|
|
|
(where-is-internal 'backward-delete-char global-map)
|
2007-11-13 18:52:00 +00:00
|
|
|
|
(where-is-internal 'backward-delete-char-untabify global-map)
|
2020-08-11 15:40:48 +02:00
|
|
|
|
'("\177"))
|
|
|
|
|
'("\177")))
|
|
|
|
|
|
|
|
|
|
(mapc (lambda (x)
|
|
|
|
|
(ignore-errors
|
|
|
|
|
(define-key calc-digit-map x 'calcDigit-delchar)
|
|
|
|
|
(define-key calc-mode-map x 'calc-pop)
|
2021-01-13 15:12:08 +01:00
|
|
|
|
(define-key calc-mode-map (vconcat "\e" x) 'calc-pop-above)))
|
2020-08-11 15:40:48 +02:00
|
|
|
|
(if calc-scan-for-dels
|
|
|
|
|
(append (where-is-internal 'delete-forward-char global-map)
|
|
|
|
|
'("\C-d"))
|
|
|
|
|
'("\C-d")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(defvar calc-dispatch-map
|
|
|
|
|
(let ((map (make-keymap)))
|
|
|
|
|
(mapc (lambda (x)
|
2008-09-02 08:49:49 +00:00
|
|
|
|
(let* ((x-chr (car x))
|
|
|
|
|
(x-str (char-to-string x-chr))
|
|
|
|
|
(x-def (cdr x)))
|
|
|
|
|
(define-key map x-str x-def)
|
|
|
|
|
(when (string-match "[a-z]" x-str)
|
|
|
|
|
;; Map upper case char to same definition.
|
|
|
|
|
(define-key map (upcase x-str) x-def)
|
|
|
|
|
(unless (string-match "[gmv]" x-str)
|
|
|
|
|
;; Map control prefixed char to same definition.
|
|
|
|
|
(define-key map (vector (list 'control x-chr)) x-def)))
|
|
|
|
|
(define-key map (format "\e%c" x-chr) x-def)))
|
2008-04-08 22:07:55 +00:00
|
|
|
|
'( ( ?a . calc-embedded-activate )
|
|
|
|
|
( ?b . calc-big-or-small )
|
|
|
|
|
( ?c . calc )
|
|
|
|
|
( ?d . calc-embedded-duplicate )
|
|
|
|
|
( ?e . calc-embedded )
|
|
|
|
|
( ?f . calc-embedded-new-formula )
|
|
|
|
|
( ?g . calc-grab-region )
|
|
|
|
|
( ?h . calc-dispatch-help )
|
|
|
|
|
( ?i . calc-info )
|
|
|
|
|
( ?j . calc-embedded-select )
|
|
|
|
|
( ?k . calc-keypad )
|
|
|
|
|
( ?l . calc-load-everything )
|
|
|
|
|
( ?m . read-kbd-macro )
|
|
|
|
|
( ?n . calc-embedded-next )
|
|
|
|
|
( ?o . calc-other-window )
|
|
|
|
|
( ?p . calc-embedded-previous )
|
|
|
|
|
( ?q . quick-calc )
|
|
|
|
|
( ?r . calc-grab-rectangle )
|
|
|
|
|
( ?s . calc-info-summary )
|
|
|
|
|
( ?t . calc-tutorial )
|
|
|
|
|
( ?u . calc-embedded-update-formula )
|
|
|
|
|
( ?w . calc-embedded-word )
|
|
|
|
|
( ?x . calc-quit )
|
|
|
|
|
( ?y . calc-copy-to-buffer )
|
|
|
|
|
( ?z . calc-user-invocation )
|
|
|
|
|
( ?\' . calc-embedded-new-formula )
|
|
|
|
|
( ?\` . calc-embedded-edit )
|
|
|
|
|
( ?: . calc-grab-sum-down )
|
|
|
|
|
( ?_ . calc-grab-sum-across )
|
|
|
|
|
( ?0 . calc-reset )
|
|
|
|
|
( ?? . calc-dispatch-help )
|
|
|
|
|
( ?# . calc-same-interface )
|
|
|
|
|
( ?& . calc-same-interface )
|
|
|
|
|
( ?\\ . calc-same-interface )
|
|
|
|
|
( ?= . calc-same-interface )
|
|
|
|
|
( ?* . calc-same-interface )
|
|
|
|
|
( ?/ . calc-same-interface )
|
|
|
|
|
( ?+ . calc-same-interface )
|
|
|
|
|
( ?- . calc-same-interface ) ))
|
|
|
|
|
map)
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
"The key map for starting Calc.")
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;; (Autoloads here)
|
2008-04-08 22:07:55 +00:00
|
|
|
|
(load "calc-loaddefs.el" nil t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2005-11-28 22:12:59 +00:00
|
|
|
|
;;;###autoload (define-key ctl-x-map "*" 'calc-dispatch)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(defun calc-dispatch (&optional _arg)
|
Disambiguate function and variable references in docstrings.
* lisp/comint.el (comint-history-isearch-message): Fix ambiguous doc
string cross-reference(s).
* lisp/ffap.el (ffap-string-at-point-region, ffap-next)
(ffap-string-at-point, ffap-string-around)
(ffap-copy-string-as-kill, ffap-highlight-overlay)
(ffap-literally): Fix ambiguous doc string cross-reference(s).
* lisp/font-lock.el (font-lock-keywords-alist)
(font-lock-removed-keywords-alist): Fix ambiguous doc string
cross-reference(s).
* lisp/help-mode.el (help-xref-symbol-regexp): Add "call" as a hint for
a cross-reference to a function.
* lisp/info.el (Info-find-emacs-command-nodes): Fix ambiguous doc
string cross-reference(s).
* lisp/isearch.el (isearch-message-function, isearch-fail-pos): Fix
ambiguous doc string cross-reference(s).
* lisp/misearch.el (multi-isearch-next-buffer-function): Fix ambiguous
doc string cross-reference(s).
* lisp/newcomment.el (comment-box): Fix ambiguous doc string
cross-reference(s).
* lisp/printing.el (pr-txt-printer-alist, pr-ps-printer-alist)
(pr-setting-database): Fix ambiguous doc string
cross-reference(s).
* lisp/ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces)
(ps-n-up-filling-database): Fix ambiguous doc string
cross-reference(s).
* lisp/server.el (server-buffer, server-log): Fix ambiguous doc string
cross-reference(s).
* lisp/simple.el (newline, delete-backward-char, delete-forward-char)
(minibuffer-history-isearch-message, kill-line, track-eol)
(temporary-goal-column): Fix ambiguous doc string
cross-reference(s).
* lisp/whitespace.el (whitespace-point)
(whitespace-font-lock-refontify, whitespace-bob-marker)
(whitespace-eob-marker): Fix ambiguous doc string
cross-reference(s).
* lisp/calc/calc.el (calc-highlight-selections-with-faces)
(calc-dispatch): Fix ambiguous doc string cross-reference(s).
* lisp/emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): Fix
ambiguous doc string cross-reference(s).
* lisp/gnus/gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string
cross-reference(s).
* lisp/gnus/gnus-sum.el (gnus-summary-newsgroup-prefix): Fix ambiguous doc string
cross-reference(s).
* lisp/international/mule.el (add-to-coding-system-list): Fix ambiguous
doc string cross-reference(s).
* lisp/progmodes/cc-fonts.el (c-font-lock-keywords-3)
(c++-font-lock-keywords-3, objc-font-lock-keywords-3)
(java-font-lock-keywords-3, idl-font-lock-keywords-3)
(pike-font-lock-keywords-3): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/compile.el (compile): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/etags.el (tags-table-files)
(tags-table-files-function, tags-included-tables-function): Fix
ambiguous doc string cross-reference(s).
* lisp/progmodes/gdb-mi.el (gdb, gdb-setup-windows)
(gdb-restore-windows): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/flyspell.el (flyspell-mark-duplications-flag)
(flyspell-default-deplacement-commands): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/ispell.el (ispell-accept-output): Fix ambiguous doc
string cross-reference(s).
* lisp/textmodes/sgml-mode.el (html-tag-help): Fix ambiguous doc string
cross-reference(s).
* lisp/vc/compare-w.el (compare-ignore-whitespace)
(compare-ignore-case, compare-windows-dehighlight): Fix ambiguous
doc string cross-reference(s).
* lisp/vc/diff.el (diff): Fix ambiguous doc string cross-reference(s).
* src/insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix
ambiguous doc string cross-reference(s).
* src/keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
doc string cross-reference(s).
* src/window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
string cross-reference(s).
Fixes: debbugs:12686
2013-01-11 18:08:55 -05:00
|
|
|
|
"Invoke the GNU Emacs Calculator. See \\[calc-dispatch-help] for details."
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(interactive)
|
2006-09-12 17:00:40 +00:00
|
|
|
|
; (sit-for echo-keystrokes)
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(ignore-errors ; look for other keys bound to calc-dispatch
|
|
|
|
|
(let ((keys (this-command-keys)))
|
|
|
|
|
(unless (or (not (stringp keys))
|
|
|
|
|
(string-match "\\`\C-u\\|\\`\e[-0-9#]\\|`[\M--\M-0-\M-9]" keys)
|
|
|
|
|
(eq (lookup-key calc-dispatch-map keys) 'calc-same-interface))
|
|
|
|
|
(when (and (string-match "\\`[\C-@-\C-_]" keys)
|
|
|
|
|
(symbolp
|
|
|
|
|
(lookup-key calc-dispatch-map (substring keys 0 1))))
|
|
|
|
|
(define-key calc-dispatch-map (substring keys 0 1) nil))
|
|
|
|
|
(define-key calc-dispatch-map keys 'calc-same-interface))))
|
|
|
|
|
(calc-do-dispatch))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(defvar calc-dispatch-help nil)
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(defun calc-do-dispatch (&optional _arg)
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
"Start the Calculator."
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((key (calc-read-key-sequence
|
|
|
|
|
(if calc-dispatch-help
|
|
|
|
|
"Calc options: Calc, Keypad, Quick, Embed; eXit; Info, Tutorial; Grab; ?=more"
|
|
|
|
|
(format "%s (Type ? for a list of Calc options)"
|
|
|
|
|
(key-description (this-command-keys))))
|
|
|
|
|
calc-dispatch-map)))
|
|
|
|
|
(setq key (lookup-key calc-dispatch-map key))
|
|
|
|
|
(message "")
|
|
|
|
|
(if key
|
|
|
|
|
(progn
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(or (commandp key) (require 'calc-ext))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(call-interactively key))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(beep))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-read-key-sequence (prompt map)
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
"Read keys, with prompt PROMPT and keymap MAP."
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(let ((glob (current-global-map))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(loc (current-local-map)))
|
2007-12-08 01:02:29 +00:00
|
|
|
|
(or (input-pending-p) (message "%s" prompt))
|
2019-06-19 22:56:26 +02:00
|
|
|
|
(let ((key (read-event))
|
2011-11-22 01:59:09 +02:00
|
|
|
|
(input-method-function nil))
|
2019-06-19 22:56:26 +02:00
|
|
|
|
(calc-unread-command key)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
|
|
|
|
(use-global-map map)
|
|
|
|
|
(use-local-map nil)
|
2004-12-02 21:21:32 +00:00
|
|
|
|
(read-key-sequence nil))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(use-global-map glob)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(use-local-map loc)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2005-05-28 04:41:46 +00:00
|
|
|
|
(defvar calc-alg-map) ; Defined in calc-ext.el
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2009-03-30 02:19:07 +00:00
|
|
|
|
|
|
|
|
|
(defvar calc-embedded-modes) ; Defined in calc-embed.el
|
|
|
|
|
(defvar calc-override-minor-modes) ; Defined in calc-embed.el
|
|
|
|
|
(defun calc-kill-stack-buffer ()
|
|
|
|
|
"Check to see if user wants to kill the Calc stack buffer.
|
|
|
|
|
This will look for buffers using the Calc buffer for embedded mode,
|
|
|
|
|
and inform the user if there are any.
|
|
|
|
|
If the user wants to kill the Calc buffer, this will remove
|
|
|
|
|
embedded information from the appropriate buffers and tidy up
|
|
|
|
|
the trail buffer."
|
|
|
|
|
(let ((cb (current-buffer))
|
|
|
|
|
(info-list nil)
|
|
|
|
|
; (plural nil)
|
|
|
|
|
(cea calc-embedded-active))
|
|
|
|
|
;; Get a list of all buffers using this buffer for
|
|
|
|
|
;; embedded Calc.
|
|
|
|
|
(while cea
|
|
|
|
|
(when (and (eq cb (aref (nth 1 (car cea)) 1))
|
|
|
|
|
(buffer-name (car (car cea))))
|
|
|
|
|
(setq info-list (cons (car cea) info-list)))
|
|
|
|
|
(setq cea (cdr cea)))
|
|
|
|
|
;; Eventually, prompt user with a list of buffers using embedded mode.
|
|
|
|
|
(when (and
|
|
|
|
|
info-list
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(yes-or-no-p
|
2009-03-30 02:19:07 +00:00
|
|
|
|
(concat "This Calc stack is being used for embedded mode. Kill anyway?")))
|
|
|
|
|
(while info-list
|
|
|
|
|
(with-current-buffer (car (car info-list))
|
|
|
|
|
(when calc-embedded-info
|
|
|
|
|
(setq calc-embedded-info nil
|
|
|
|
|
mode-line-buffer-identification (car calc-embedded-modes)
|
|
|
|
|
truncate-lines (nth 2 calc-embedded-modes)
|
|
|
|
|
buffer-read-only nil)
|
|
|
|
|
(use-local-map (nth 1 calc-embedded-modes))
|
|
|
|
|
(setq minor-mode-overriding-map-alist
|
|
|
|
|
(remq calc-override-minor-modes minor-mode-overriding-map-alist))
|
|
|
|
|
(let ((str mode-line-buffer-identification))
|
|
|
|
|
(setq mode-line-buffer-identification str))
|
|
|
|
|
(set-buffer-modified-p (buffer-modified-p))))
|
|
|
|
|
(setq calc-embedded-active
|
|
|
|
|
(delete (car info-list) calc-embedded-active))
|
|
|
|
|
(setq info-list (cdr info-list))))
|
|
|
|
|
(if (not info-list)
|
|
|
|
|
(progn
|
|
|
|
|
(setq calc-buffer-list (delete cb calc-buffer-list))
|
2011-06-01 19:09:42 -05:00
|
|
|
|
(if (buffer-live-p calc-trail-buffer)
|
|
|
|
|
(with-current-buffer calc-trail-buffer
|
|
|
|
|
(if (eq cb calc-main-buffer)
|
|
|
|
|
;; If there are other Calc stacks, make another one
|
|
|
|
|
;; the calc-main-buffer ...
|
|
|
|
|
(if calc-buffer-list
|
|
|
|
|
(setq calc-main-buffer (car calc-buffer-list))
|
|
|
|
|
;; ... otherwise kill the trail and its windows.
|
|
|
|
|
(let ((wl (get-buffer-window-list calc-trail-buffer)))
|
|
|
|
|
(while wl
|
|
|
|
|
(delete-window (car wl))
|
|
|
|
|
(setq wl (cdr wl))))
|
|
|
|
|
(kill-buffer calc-trail-buffer)))))
|
|
|
|
|
(setq calc-trail-buffer nil)
|
2009-03-30 02:19:07 +00:00
|
|
|
|
t))))
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-mode ()
|
|
|
|
|
"Calculator major mode.
|
|
|
|
|
|
|
|
|
|
This is an RPN calculator featuring arbitrary-precision integer, rational,
|
|
|
|
|
floating-point, complex, matrix, and symbolic arithmetic.
|
|
|
|
|
|
|
|
|
|
RPN calculation: 2 RET 3 + produces 5.
|
2015-08-28 22:24:10 -07:00
|
|
|
|
Algebraic style: \\=' 2+3 RET produces 5.
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
Basic operators are +, -, *, /, ^, & (reciprocal), % (modulo), n (change-sign).
|
|
|
|
|
|
|
|
|
|
Press ? repeatedly for more complete help. Press `h i' to read the
|
|
|
|
|
Calc manual on-line, `h s' to read the summary, or `h t' for the tutorial.
|
|
|
|
|
|
|
|
|
|
Notations: 3.14e6 3.14 * 10^6
|
|
|
|
|
_23 negative number -23 (or type `23 n')
|
|
|
|
|
17:3 the fraction 17/3
|
|
|
|
|
5:2:3 the fraction 5 and 2/3
|
|
|
|
|
16#12C the integer 12C base 16 = 300 base 10
|
|
|
|
|
8#177:100 the fraction 177:100 base 8 = 127:64 base 10
|
|
|
|
|
(2, 4) complex number 2 + 4i
|
|
|
|
|
(2; 4) polar complex number (r; theta)
|
|
|
|
|
[1, 2, 3] vector ([[1, 2], [3, 4]] is a matrix)
|
|
|
|
|
[1 .. 4) semi-open interval, 1 <= x < 4
|
|
|
|
|
2 +/- 3 (p key) number with mean 2, standard deviation 3
|
|
|
|
|
2 mod 3 (M key) number 2 computed modulo 3
|
2015-08-28 22:24:10 -07:00
|
|
|
|
<1 jan 91> Date form (enter using \\=' key)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
\\{calc-mode-map}"
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(interactive)
|
Don't quote lambdas with 'function' in calc/*.el
* lisp/calc/calc-aent.el (calc-do-quick-calc)
(calc-do-calc-eval, math-build-parse-table):
* lisp/calc/calc-alg.el (math-polynomial-base):
* lisp/calc/calc-alg.el (math-is-poly-rec):
* lisp/calc/calc-arith.el (calcFunc-scf):
* lisp/calc/calc-arith.el (math-ceiling, math-round):
* lisp/calc/calc-arith.el (math-trunc-fancy, math-floor-fancy):
* lisp/calc/calc-ext.el (calc-init-extensions, calc-reset)
(calc-refresh-top, calc-z-prefix-help, calc-binary-op-fancy)
(calc-unary-op-fancy):
* lisp/calc/calc-forms.el (math-make-mod):
* lisp/calc/calc-frac.el (calcFunc-frac):
* lisp/calc/calc-funcs.el (calcFunc-euler):
* lisp/calc/calc-help.el (calc-full-help):
* lisp/calc/calc-lang.el (c, pascal, fortran, tex, latex, eqn)
(yacas, maxima, giac, math, maple):
* lisp/calc/calc-macs.el (calc-wrapper, calc-slow-wrapper):
* lisp/calc/calc-map.el (calc-get-operator, calcFunc-mapeqr)
(calcFunc-reducea, calcFunc-rreducea, calcFunc-reduced)
(calcFunc-rreduced, calcFunc-outer):
* lisp/calc/calc-misc.el (another-calc, calc-do-handle-whys):
* lisp/calc/calc-mode.el (calc-save-modes):
* lisp/calc/calc-mtx.el (math-col-matrix, math-mul-mat-vec):
* lisp/calc/calc-poly.el (math-sort-terms, math-poly-div-list)
(math-mul-list, math-sort-poly-base-list)
(math-partial-fractions):
* lisp/calc/calc-prog.el (calc-user-define-formula):
* lisp/calc/calc-rewr.el (math-rewrite, math-compile-patterns)
(math-compile-rewrites, math-parse-schedule)
(math-rwcomp-pattern):
* lisp/calc/calc-store.el (calc-var-name-map, calc-let)
(calc-permanent-variable, calc-insert-variables):
* lisp/calc/calc-stuff.el (calc-flush-caches, calcFunc-pclean)
(calcFunc-pfrac):
* lisp/calc/calc-units.el (math-build-units-table)
(math-decompose-units):
* lisp/calc/calc-vec.el (calcFunc-mrow, math-mat-col)
(calcFunc-mcol, math-mat-less-col, math-mimic-ident):
* lisp/calc/calc-yank.el (calc-edit):
* lisp/calc/calc.el
(calc-mode-var-list-restore-default-values)
(calc-mode-var-list-restore-saved-values, calc-mode, calc-quit):
* lisp/calc/calccomp.el (math-compose-expr)
(math-compose-matrix, math-vector-to-string): Don't quote lambdas with
'function'.
2020-11-17 02:51:30 +01:00
|
|
|
|
(mapc (lambda (v)
|
|
|
|
|
;; FIXME: Why (set-default v (symbol-value v)) ?!?!?
|
|
|
|
|
(set-default v (symbol-value v)))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
calc-local-var-list)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(kill-all-local-variables)
|
|
|
|
|
(use-local-map (if (eq calc-algebraic-mode 'total)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(progn (require 'calc-ext) calc-alg-map) calc-mode-map))
|
2012-09-19 23:44:57 -04:00
|
|
|
|
(mapc #'make-local-variable calc-local-var-list)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(make-local-variable 'overlay-arrow-position)
|
|
|
|
|
(make-local-variable 'overlay-arrow-string)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(add-hook 'change-major-mode-hook #'font-lock-defontify nil t)
|
2009-03-30 02:19:07 +00:00
|
|
|
|
(add-hook 'kill-buffer-query-functions
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
#'calc-kill-stack-buffer
|
2009-03-30 02:19:07 +00:00
|
|
|
|
t t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq truncate-lines t)
|
|
|
|
|
(setq buffer-read-only t)
|
|
|
|
|
(setq major-mode 'calc-mode)
|
|
|
|
|
(setq mode-name "Calculator")
|
|
|
|
|
(setq calc-stack-top (length (or (memq (assq 'top-of-stack calc-stack)
|
|
|
|
|
calc-stack)
|
|
|
|
|
(setq calc-stack (list (list 'top-of-stack
|
|
|
|
|
1 nil))))))
|
|
|
|
|
(setq calc-stack-top (- (length calc-stack) calc-stack-top -1))
|
|
|
|
|
(or calc-loaded-settings-file
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(null calc-settings-file)
|
2004-09-15 16:54:26 +00:00
|
|
|
|
(equal calc-settings-file user-init-file)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(setq calc-loaded-settings-file t)
|
2005-01-08 20:35:45 +00:00
|
|
|
|
(load (file-name-sans-extension calc-settings-file) t))) ; t = missing-ok
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((p command-line-args))
|
|
|
|
|
(while p
|
|
|
|
|
(and (equal (car p) "-f")
|
|
|
|
|
(string-match "calc" (nth 1 p))
|
|
|
|
|
(string-match "full" (nth 1 p))
|
|
|
|
|
(setq calc-standalone-flag t))
|
|
|
|
|
(setq p (cdr p))))
|
2007-11-15 02:57:46 +00:00
|
|
|
|
(require 'calc-menu)
|
2005-05-26 13:30:23 +00:00
|
|
|
|
(run-mode-hooks 'calc-mode-hook)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-refresh t)
|
|
|
|
|
(calc-set-mode-line)
|
2009-03-30 02:19:07 +00:00
|
|
|
|
(calc-check-defines)
|
2009-04-27 23:12:20 +00:00
|
|
|
|
(if calc-buffer-list (setq calc-stack (copy-sequence calc-stack)))
|
2009-03-30 02:19:07 +00:00
|
|
|
|
(add-to-list 'calc-buffer-list (current-buffer) t))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2012-09-19 23:44:57 -04:00
|
|
|
|
(defvar calc-check-defines 'calc-check-defines) ; Suitable for run-hooks.
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-check-defines ()
|
|
|
|
|
(if (symbol-plist 'calc-define)
|
|
|
|
|
(let ((plist (copy-sequence (symbol-plist 'calc-define))))
|
|
|
|
|
(while (and plist (null (nth 1 plist)))
|
|
|
|
|
(setq plist (cdr (cdr plist))))
|
|
|
|
|
(if plist
|
|
|
|
|
(save-excursion
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
|
|
|
|
(require 'calc-macs)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(set-buffer "*Calculator*")
|
|
|
|
|
(while plist
|
|
|
|
|
(put 'calc-define (car plist) nil)
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(eval (nth 1 plist) t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq plist (cdr (cdr plist))))
|
|
|
|
|
;; See if this has added any more calc-define properties.
|
|
|
|
|
(calc-check-defines))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(setplist 'calc-define nil)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(defvar calc-trail-mode-map
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
(set-keymap-parent map calc-mode-map)
|
|
|
|
|
map))
|
|
|
|
|
|
2020-09-10 23:44:16 +02:00
|
|
|
|
(defun calc--header-line (long short width &optional fudge)
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"Return a Calc header line appropriate for the buffer WIDTH.
|
2020-09-10 23:44:16 +02:00
|
|
|
|
|
|
|
|
|
LONG is a desired text for a wide window, SHORT is a desired
|
|
|
|
|
abbreviated text, and width is the buffer width, which will be
|
|
|
|
|
some fraction of the 'parent' window width (At the time of
|
2021-09-14 08:43:18 +02:00
|
|
|
|
writing, 2/3 for calc, 1/3 for trail). The optional FUDGE is a
|
2020-09-10 23:44:16 +02:00
|
|
|
|
trial-and-error adjustment number for the edge-cases at the
|
|
|
|
|
border of the two cases."
|
|
|
|
|
;; TODO: This could be called as part of a 'window-resize' hook.
|
|
|
|
|
(setq header-line-format
|
|
|
|
|
(let* ((len-long (length long))
|
|
|
|
|
(len-short (length short))
|
|
|
|
|
(fudge (or fudge 0))
|
|
|
|
|
;; fudge for trail is: -3 (added to len-long)
|
|
|
|
|
;; (width ) for trail
|
|
|
|
|
(factor (if (> width (+ len-long fudge)) len-long len-short))
|
2020-09-11 12:54:00 +02:00
|
|
|
|
(size (max (/ (- width factor) 2) 0))
|
2020-09-10 23:44:16 +02:00
|
|
|
|
(fill (make-string size ?-))
|
|
|
|
|
(pre (replace-regexp-in-string ".$" " " fill))
|
|
|
|
|
(post (replace-regexp-in-string "^." " " fill)))
|
|
|
|
|
(concat pre (if (= factor len-long) long short) post))))
|
|
|
|
|
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(define-derived-mode calc-trail-mode fundamental-mode "Calc Trail"
|
2001-11-06 18:59:06 +00:00
|
|
|
|
"Calc Trail mode.
|
|
|
|
|
This mode is used by the *Calc Trail* buffer, which records all results
|
|
|
|
|
obtained by the GNU Emacs Calculator.
|
|
|
|
|
|
2021-09-14 08:43:18 +02:00
|
|
|
|
Calculator commands beginning with the t key are used to manipulate
|
2001-11-06 18:59:06 +00:00
|
|
|
|
the Trail.
|
|
|
|
|
|
|
|
|
|
This buffer uses the same key map as the *Calculator* buffer; calculator
|
|
|
|
|
commands given here will actually operate on the *Calculator* stack."
|
|
|
|
|
(setq truncate-lines t)
|
|
|
|
|
(setq buffer-read-only t)
|
|
|
|
|
(make-local-variable 'overlay-arrow-position)
|
|
|
|
|
(make-local-variable 'overlay-arrow-string)
|
2020-09-10 23:44:16 +02:00
|
|
|
|
(when calc-show-banner
|
|
|
|
|
(calc--header-line "Emacs Calculator Trail" "Calc Trail"
|
|
|
|
|
(/ (window-width) 3) -3)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-create-buffer ()
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
"Create and initialize a buffer for the Calculator."
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(set-buffer (get-buffer-create "*Calculator*"))
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(or (derived-mode-p 'calc-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-mode))
|
|
|
|
|
(setq max-lisp-eval-depth (max max-lisp-eval-depth 1000))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when calc-always-load-extensions
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when calc-language
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(calc-set-language calc-language calc-language-option t)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2020-11-14 15:02:13 +02:00
|
|
|
|
(defcustom calc-make-windows-dedicated t
|
|
|
|
|
"If non-nil, windows displaying Calc buffers will be marked dedicated.
|
|
|
|
|
See `window-dedicated-p' for what that means."
|
|
|
|
|
:version "28.1"
|
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun calc (&optional arg full-display interactive)
|
2019-09-24 17:52:10 +02:00
|
|
|
|
"The Emacs Calculator. Full documentation is listed under `calc-mode'."
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(interactive "P\ni\np")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if arg
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(unless (eq arg 0)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(if (= (prefix-numeric-value arg) -1)
|
|
|
|
|
(calc-grab-region (region-beginning) (region-end) nil)
|
|
|
|
|
(when (= (prefix-numeric-value arg) -2)
|
|
|
|
|
(calc-keypad))))
|
|
|
|
|
(when (get-buffer-window "*Calc Keypad*")
|
|
|
|
|
(calc-keypad)
|
Do not call to `selected-window' where it is assumed by default.
Affected functions are `window-minibuffer-p', `window-dedicated-p',
`window-hscroll', `window-width', `window-height', `window-buffer',
`window-frame', `window-start', `window-point', `next-window'
and `window-display-table'.
* abbrev.el (abbrev--default-expand):
* bs.el (bs--show-with-configuration):
* buff-menu.el (Buffer-menu-mouse-select):
* calc/calc.el (calc):
* calendar/calendar.el (calendar-generate-window):
* calendar/diary-lib.el (diary-simple-display, diary-show-all-entries)
(diary-make-entry):
* comint.el (send-invisible, comint-dynamic-complete-filename)
(comint-dynamic-simple-complete, comint-dynamic-list-completions):
* completion.el (complete):
* dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list):
* disp-table.el (describe-current-display-table):
* doc-view.el (doc-view-insert-image):
* ebuff-menu.el (Electric-buffer-menu-mouse-select):
* ehelp.el (with-electric-help):
* emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer):
* emacs-lisp/helper.el (Helper-help-scroller):
* emulation/cua-base.el (cua--post-command-handler-1):
* eshell/esh-mode.el (eshell-output-filter):
* ffap.el (ffap-gnus-wrapper):
* help-macro.el (make-help-screen):
* hilit-chg.el (highlight-compare-buffers):
* hippie-exp.el (hippie-expand, try-expand-dabbrev-visible):
* hl-line.el (global-hl-line-highlight):
* icomplete.el (icomplete-simple-completing-p):
* isearch.el (isearch-done):
* jit-lock.el (jit-lock-stealth-fontify):
* mail/rmailsum.el (rmail-summary-scroll-msg-up):
* lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
* mpc.el (mpc-tagbrowser, mpc):
* net/rcirc.el (rcirc-any-buffer):
* play/gomoku.el (gomoku-max-width, gomoku-max-height):
* play/landmark.el (landmark-max-width, landmark-max-height):
* play/zone.el (zone):
* progmodes/compile.el (compilation-goto-locus):
* progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
* progmodes/etags.el (find-tag-other-window):
* progmodes/fortran.el (fortran-column-ruler):
* progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
* progmodes/verilog-mode.el (verilog-point-text):
* reposition.el (reposition-window):
* rot13.el (toggle-rot13-mode):
* server.el (server-switch-buffer):
* shell.el (shell-dynamic-complete-command)
(shell-dynamic-complete-environment-variable):
* simple.el (insert-buffer, set-selective-display)
(delete-completion-window):
* speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly)
(speedbar-recenter):
* startup.el (fancy-splash-head):
* textmodes/ispell.el (ispell-command-loop):
* textmodes/makeinfo.el (makeinfo-compilation-sentinel-region):
* tutorial.el (help-with-tutorial):
* vc/add-log.el (add-change-log-entry):
* vc/compare-w.el (compare-windows):
* vc/ediff-help.el (ediff-indent-help-message):
* vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region):
* vc/ediff-wind.el (ediff-skip-unsuitable-frames)
(ediff-setup-control-frame):
* vc/emerge.el (emerge-position-region):
* vc/pcvs-util.el (cvs-bury-buffer):
* window.el (walk-windows, mouse-autoselect-window-select):
* winner.el (winner-set-conf, winner-undo): Related users changed.
2013-08-05 18:26:57 +04:00
|
|
|
|
(set-buffer (window-buffer)))
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(if (derived-mode-p 'calc-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-quit)
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(calc-create-buffer)
|
|
|
|
|
(setq calc-was-keypad-mode nil)
|
|
|
|
|
(if (or (eq full-display t)
|
|
|
|
|
(and (null full-display) calc-full-mode))
|
|
|
|
|
(switch-to-buffer (current-buffer) t)
|
|
|
|
|
(if (get-buffer-window (current-buffer))
|
|
|
|
|
(select-window (get-buffer-window (current-buffer)))
|
|
|
|
|
(if calc-window-hook
|
|
|
|
|
(run-hooks 'calc-window-hook)
|
|
|
|
|
(let ((w (get-largest-window)))
|
|
|
|
|
(if (and pop-up-windows
|
|
|
|
|
(> (window-height w)
|
|
|
|
|
(+ window-min-height calc-window-height 2)))
|
|
|
|
|
(progn
|
|
|
|
|
(setq w (split-window w
|
|
|
|
|
(- (window-height w)
|
|
|
|
|
calc-window-height 2)
|
|
|
|
|
nil))
|
|
|
|
|
(set-window-buffer w (current-buffer))
|
|
|
|
|
(select-window w))
|
|
|
|
|
(pop-to-buffer (current-buffer)))))))
|
|
|
|
|
(with-current-buffer (calc-trail-buffer)
|
|
|
|
|
(and calc-display-trail
|
|
|
|
|
(calc-trail-display 1 t)))
|
2021-09-24 20:59:32 +02:00
|
|
|
|
(message (substitute-command-keys
|
|
|
|
|
(concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
|
|
|
|
|
"Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit")))
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(run-hooks 'calc-start-hook)
|
|
|
|
|
(and (windowp full-display)
|
|
|
|
|
(window-point full-display)
|
|
|
|
|
(select-window full-display))
|
2020-11-14 15:02:13 +02:00
|
|
|
|
(and calc-make-windows-dedicated
|
|
|
|
|
(set-window-dedicated-p nil t))
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(calc-check-defines)
|
|
|
|
|
(when (and calc-said-hello interactive)
|
|
|
|
|
(sit-for 2)
|
|
|
|
|
(message ""))
|
|
|
|
|
(setq calc-said-hello t))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(defun full-calc (&optional interactive)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
"Invoke the Calculator and give it a full-sized window."
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(interactive "p")
|
|
|
|
|
(calc nil t interactive))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-same-interface (arg)
|
2021-09-14 08:43:18 +02:00
|
|
|
|
"Invoke the Calculator using the most recent interface (`calc' or `calc-keypad')."
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
(if (and (equal (buffer-name) "*Gnuplot Trail*")
|
|
|
|
|
(> (recursion-depth) 0))
|
|
|
|
|
(exit-recursive-edit)
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(if (derived-mode-p 'calc-edit-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-edit-finish arg)
|
2004-12-31 03:29:25 +00:00
|
|
|
|
(if calc-was-keypad-mode
|
|
|
|
|
(calc-keypad)
|
|
|
|
|
(calc arg calc-full-mode t)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(defun calc-quit (&optional non-fatal interactive)
|
(calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables)
(calc-gnuplot-default-device, calc-gnuplot-default-output)
(calc-gnuplot-print-device, calc-gnuplot-print-output)
(calc-gnuplot-geometry, calc-graph-default-resolution)
(calc-graph-default-resolution-3d, calc-invocation-macro)
(calc-trail-pointer, calc-trail-overlay, calc-undo-list)
(calc-redo-list, calc-main-buffer, calc-trail-buffer, calc-why)
(calc-last-kill, calc-dollar-values, calc-dollar-used)
(calc-hashes-used, calc-quick-prev-results, calc-said-hello)
(calc-executing-macro, calc-any-selections, calc-help-phase)
(calc-full-help-flag, calc-refresh-count, calc-display-dirty)
(calc-embedded-info, calc-embedded-active, calc-standalone-flag)
(var-EvalRules, math-expr-function-mapping, math-expr-variable-mapping)
(calc-mode-map, calc-digit-map, calc-dispatch-map, calc-do-dispatch)
(calc-read-key-sequence, calc-create-buffer, calc-quit): Add docstrings.
2008-03-23 02:30:04 +00:00
|
|
|
|
"Quit the Calculator in an appropriate manner."
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(interactive "i\np")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(and calc-standalone-flag (not non-fatal)
|
|
|
|
|
(save-buffers-kill-emacs nil))
|
|
|
|
|
(if (and (equal (buffer-name) "*Gnuplot Trail*")
|
|
|
|
|
(> (recursion-depth) 0))
|
|
|
|
|
(exit-recursive-edit))
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(if (derived-mode-p 'calc-edit-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-edit-cancel)
|
2004-12-31 03:29:25 +00:00
|
|
|
|
(if (and interactive
|
|
|
|
|
calc-embedded-info
|
|
|
|
|
(eq (current-buffer) (aref calc-embedded-info 0)))
|
|
|
|
|
(calc-embedded nil)
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(unless (derived-mode-p 'calc-mode)
|
2004-12-31 03:29:25 +00:00
|
|
|
|
(calc-create-buffer))
|
|
|
|
|
(run-hooks 'calc-end-hook)
|
2009-07-21 18:56:35 +00:00
|
|
|
|
(if (integerp calc-undo-length)
|
|
|
|
|
(cond
|
|
|
|
|
((= calc-undo-length 0)
|
|
|
|
|
(setq calc-undo-list nil calc-redo-list nil))
|
|
|
|
|
((> calc-undo-length 0)
|
|
|
|
|
(let ((tail (nthcdr (1- calc-undo-length) calc-undo-list)))
|
|
|
|
|
(if tail (setcdr tail nil)))
|
|
|
|
|
(setq calc-redo-list nil))))
|
Don't quote lambdas with 'function' in calc/*.el
* lisp/calc/calc-aent.el (calc-do-quick-calc)
(calc-do-calc-eval, math-build-parse-table):
* lisp/calc/calc-alg.el (math-polynomial-base):
* lisp/calc/calc-alg.el (math-is-poly-rec):
* lisp/calc/calc-arith.el (calcFunc-scf):
* lisp/calc/calc-arith.el (math-ceiling, math-round):
* lisp/calc/calc-arith.el (math-trunc-fancy, math-floor-fancy):
* lisp/calc/calc-ext.el (calc-init-extensions, calc-reset)
(calc-refresh-top, calc-z-prefix-help, calc-binary-op-fancy)
(calc-unary-op-fancy):
* lisp/calc/calc-forms.el (math-make-mod):
* lisp/calc/calc-frac.el (calcFunc-frac):
* lisp/calc/calc-funcs.el (calcFunc-euler):
* lisp/calc/calc-help.el (calc-full-help):
* lisp/calc/calc-lang.el (c, pascal, fortran, tex, latex, eqn)
(yacas, maxima, giac, math, maple):
* lisp/calc/calc-macs.el (calc-wrapper, calc-slow-wrapper):
* lisp/calc/calc-map.el (calc-get-operator, calcFunc-mapeqr)
(calcFunc-reducea, calcFunc-rreducea, calcFunc-reduced)
(calcFunc-rreduced, calcFunc-outer):
* lisp/calc/calc-misc.el (another-calc, calc-do-handle-whys):
* lisp/calc/calc-mode.el (calc-save-modes):
* lisp/calc/calc-mtx.el (math-col-matrix, math-mul-mat-vec):
* lisp/calc/calc-poly.el (math-sort-terms, math-poly-div-list)
(math-mul-list, math-sort-poly-base-list)
(math-partial-fractions):
* lisp/calc/calc-prog.el (calc-user-define-formula):
* lisp/calc/calc-rewr.el (math-rewrite, math-compile-patterns)
(math-compile-rewrites, math-parse-schedule)
(math-rwcomp-pattern):
* lisp/calc/calc-store.el (calc-var-name-map, calc-let)
(calc-permanent-variable, calc-insert-variables):
* lisp/calc/calc-stuff.el (calc-flush-caches, calcFunc-pclean)
(calcFunc-pfrac):
* lisp/calc/calc-units.el (math-build-units-table)
(math-decompose-units):
* lisp/calc/calc-vec.el (calcFunc-mrow, math-mat-col)
(calcFunc-mcol, math-mat-less-col, math-mimic-ident):
* lisp/calc/calc-yank.el (calc-edit):
* lisp/calc/calc.el
(calc-mode-var-list-restore-default-values)
(calc-mode-var-list-restore-saved-values, calc-mode, calc-quit):
* lisp/calc/calccomp.el (math-compose-expr)
(math-compose-matrix, math-vector-to-string): Don't quote lambdas with
'function'.
2020-11-17 02:51:30 +01:00
|
|
|
|
(mapc (lambda (v) (set-default v (symbol-value v)))
|
2007-09-26 00:09:32 +00:00
|
|
|
|
calc-local-var-list)
|
2004-12-31 03:29:25 +00:00
|
|
|
|
(let ((buf (current-buffer))
|
|
|
|
|
(win (get-buffer-window (current-buffer)))
|
|
|
|
|
(kbuf (get-buffer "*Calc Keypad*")))
|
|
|
|
|
(delete-windows-on (calc-trail-buffer))
|
2008-11-05 22:12:21 +00:00
|
|
|
|
;; The next few lines will set `calc-window-height' so that the
|
|
|
|
|
;; next time Calc is called, the window will be the same size
|
|
|
|
|
;; as the current window.
|
2004-12-31 03:29:25 +00:00
|
|
|
|
(if (and win
|
2009-10-06 02:42:29 +00:00
|
|
|
|
(not (window-full-height-p win))
|
2008-11-05 22:12:21 +00:00
|
|
|
|
(window-full-width-p win) ; avoid calc-keypad
|
2004-12-31 03:29:25 +00:00
|
|
|
|
(not (get-buffer-window "*Calc Keypad*")))
|
|
|
|
|
(setq calc-window-height (- (window-height win) 2)))
|
|
|
|
|
(progn
|
|
|
|
|
(delete-windows-on buf)
|
2008-11-04 23:52:15 +00:00
|
|
|
|
(and kbuf (delete-windows-on kbuf)))
|
2004-12-31 03:29:25 +00:00
|
|
|
|
(bury-buffer buf)
|
|
|
|
|
(bury-buffer calc-trail-buffer)
|
|
|
|
|
(and kbuf (bury-buffer kbuf))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2014-10-28 19:37:37 -05:00
|
|
|
|
(defun quick-calc (&optional insert)
|
|
|
|
|
"Do a quick calculation in the minibuffer without invoking full Calculator.
|
|
|
|
|
With prefix argument INSERT, insert the result in the current
|
|
|
|
|
buffer. Otherwise, the result is copied into the kill ring."
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-do-quick-calc insert))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(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."
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-do-calc-eval str separator args))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(defun calc-keypad (&optional interactive)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
"Invoke the Calculator in \"visual keypad\" mode.
|
|
|
|
|
This is most useful in the X window system.
|
|
|
|
|
In this mode, click on the Calc \"buttons\" using the left mouse button.
|
2021-09-14 08:43:18 +02:00
|
|
|
|
Or, position the cursor manually and do \\[calc-keypad-press]."
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(interactive "p")
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(calc-do-keypad calc-full-mode interactive))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(defun full-calc-keypad (&optional interactive)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
"Invoke the Calculator in full-screen \"visual keypad\" mode.
|
|
|
|
|
See calc-keypad for details."
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(interactive "p")
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(calc-do-keypad t interactive))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(defvar calc-aborted-prefix nil)
|
|
|
|
|
(defvar calc-start-time nil)
|
2010-01-16 23:08:35 -06:00
|
|
|
|
(defvar calc-command-flags nil)
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-final-point-line)
|
|
|
|
|
(defvar calc-final-point-column)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
;;; Note that modifications to this function may break calc-pass-errors.
|
|
|
|
|
(defun calc-do (do-body &optional do-slow)
|
|
|
|
|
(calc-check-defines)
|
|
|
|
|
(let* ((calc-command-flags nil)
|
|
|
|
|
(calc-start-time (and calc-timing (not calc-start-time)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(current-time-string)))
|
|
|
|
|
(gc-cons-threshold (max gc-cons-threshold
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(if calc-timing 2000000 100000)))
|
|
|
|
|
calc-final-point-line calc-final-point-column)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq calc-aborted-prefix "")
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(condition-case err
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if calc-embedded-info
|
|
|
|
|
(calc-embedded-select-buffer)
|
|
|
|
|
(calc-select-buffer))
|
|
|
|
|
(and (eq calc-algebraic-mode 'total)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(use-local-map calc-alg-map))
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(when (and do-slow calc-display-working-message)
|
|
|
|
|
(message "Working...")
|
|
|
|
|
(calc-set-command-flag 'clear-message))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(funcall do-body)
|
|
|
|
|
(setq calc-aborted-prefix nil)
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(when (memq 'renum-stack calc-command-flags)
|
|
|
|
|
(calc-renumber-stack))
|
|
|
|
|
(when (memq 'clear-message calc-command-flags)
|
|
|
|
|
(message "")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(error
|
|
|
|
|
(if (and (eq (car err) 'error)
|
|
|
|
|
(stringp (nth 1 err))
|
|
|
|
|
(string-match "max-specpdl-size\\|max-lisp-eval-depth"
|
|
|
|
|
(nth 1 err)))
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 08:41:44 -07:00
|
|
|
|
(error "Computation got stuck or ran too long. Type `M' to increase the limit")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq calc-aborted-prefix nil)
|
|
|
|
|
(signal (car err) (cdr err)))))
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(when calc-aborted-prefix
|
|
|
|
|
(calc-record "<Aborted>" calc-aborted-prefix))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(and calc-start-time
|
|
|
|
|
(let* ((calc-internal-prec 12)
|
|
|
|
|
(calc-date-format nil)
|
|
|
|
|
(end-time (current-time-string))
|
|
|
|
|
(time (if (equal calc-start-time end-time)
|
|
|
|
|
0
|
|
|
|
|
(math-sub
|
|
|
|
|
(calcFunc-unixtime (math-parse-date end-time) 0)
|
|
|
|
|
(calcFunc-unixtime (math-parse-date calc-start-time)
|
|
|
|
|
0)))))
|
|
|
|
|
(if (math-lessp 1 time)
|
|
|
|
|
(calc-record time "(t)"))))
|
|
|
|
|
(or (memq 'no-align calc-command-flags)
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(derived-mode-p 'calc-trail-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-align-stack-window))
|
|
|
|
|
(and (memq 'position-point calc-command-flags)
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(if (derived-mode-p 'calc-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
2009-08-22 19:29:18 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- calc-final-point-line))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(move-to-column calc-final-point-column))
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(save-current-buffer
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-select-buffer)
|
2009-08-22 19:29:18 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- calc-final-point-line))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(move-to-column calc-final-point-column))))
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(unless (memq 'keep-flags calc-command-flags)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-select-buffer)
|
|
|
|
|
(setq calc-inverse-flag nil
|
|
|
|
|
calc-hyperbolic-flag nil
|
2010-04-16 21:47:25 -05:00
|
|
|
|
calc-option-flag nil
|
2001-11-19 07:43:05 +00:00
|
|
|
|
calc-keep-args-flag nil)))
|
|
|
|
|
(when (memq 'do-edit calc-command-flags)
|
|
|
|
|
(switch-to-buffer (get-buffer-create "*Calc Edit*")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-set-mode-line)
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(when calc-embedded-info
|
|
|
|
|
(calc-embedded-finish-command))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(identity nil)) ; allow a GC after timing is done
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-set-command-flag (f)
|
2001-11-19 07:43:05 +00:00
|
|
|
|
(unless (memq f calc-command-flags)
|
|
|
|
|
(setq calc-command-flags (cons f calc-command-flags))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-select-buffer ()
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(or (derived-mode-p 'calc-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if calc-main-buffer
|
|
|
|
|
(set-buffer calc-main-buffer)
|
|
|
|
|
(let ((buf (get-buffer "*Calculator*")))
|
|
|
|
|
(if buf
|
|
|
|
|
(set-buffer buf)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(error "Calculator buffer not available"))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-cursor-stack-index (&optional index)
|
|
|
|
|
(goto-char (point-max))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(forward-line (- (calc-substack-height (or index 1)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-stack-size ()
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(- (length calc-stack) calc-stack-top))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-substack-height (n)
|
|
|
|
|
(let ((sum 0)
|
|
|
|
|
(stack calc-stack))
|
|
|
|
|
(setq n (+ n calc-stack-top))
|
|
|
|
|
(while (and (> n 0) stack)
|
|
|
|
|
(setq sum (+ sum (nth 1 (car stack)))
|
|
|
|
|
n (1- n)
|
|
|
|
|
stack (cdr stack)))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
sum))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-set-mode-line ()
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-select-buffer)
|
|
|
|
|
(let* ((fmt (car calc-float-format))
|
|
|
|
|
(figs (nth 1 calc-float-format))
|
|
|
|
|
(new-mode-string
|
2019-08-03 22:00:40 +02:00
|
|
|
|
(format "Calc%s%s: %d %s %s"
|
2009-04-26 01:39:48 +00:00
|
|
|
|
(if (and calc-embedded-info
|
|
|
|
|
(eq (aref calc-embedded-info 1) (current-buffer)))
|
|
|
|
|
"Embed" "")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (and (> (length (buffer-name)) 12)
|
|
|
|
|
(equal (substring (buffer-name) 0 12)
|
|
|
|
|
"*Calculator*"))
|
|
|
|
|
(substring (buffer-name) 12)
|
|
|
|
|
"")
|
|
|
|
|
calc-internal-prec
|
|
|
|
|
(capitalize (symbol-name calc-angle-mode))
|
|
|
|
|
(concat
|
|
|
|
|
|
|
|
|
|
;; Input-related modes
|
|
|
|
|
(if (eq calc-algebraic-mode 'total) "Alg* "
|
|
|
|
|
(if calc-algebraic-mode "Alg "
|
|
|
|
|
(if calc-incomplete-algebraic-mode "Alg[( " "")))
|
|
|
|
|
|
|
|
|
|
;; Computational modes
|
|
|
|
|
(if calc-symbolic-mode "Symb " "")
|
|
|
|
|
(cond ((eq calc-matrix-mode 'matrix) "Matrix ")
|
|
|
|
|
((integerp calc-matrix-mode)
|
|
|
|
|
(format "Matrix%d " calc-matrix-mode))
|
2005-10-10 19:41:08 +00:00
|
|
|
|
((eq calc-matrix-mode 'sqmatrix) "SqMatrix ")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((eq calc-matrix-mode 'scalar) "Scalar ")
|
|
|
|
|
(t ""))
|
|
|
|
|
(if (eq calc-complex-mode 'polar) "Polar " "")
|
|
|
|
|
(if calc-prefer-frac "Frac " "")
|
|
|
|
|
(cond ((null calc-infinite-mode) "")
|
|
|
|
|
((eq calc-infinite-mode 1) "+Inf ")
|
|
|
|
|
(t "Inf "))
|
|
|
|
|
(cond ((eq calc-simplify-mode 'none) "NoSimp ")
|
|
|
|
|
((eq calc-simplify-mode 'num) "NumSimp ")
|
|
|
|
|
((eq calc-simplify-mode 'binary)
|
|
|
|
|
(format "BinSimp%d " calc-word-size))
|
2012-07-29 18:19:09 -05:00
|
|
|
|
((eq calc-simplify-mode 'alg) "")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((eq calc-simplify-mode 'ext) "ExtSimp ")
|
|
|
|
|
((eq calc-simplify-mode 'units) "UnitSimp ")
|
2012-07-31 16:32:28 -05:00
|
|
|
|
(t "BasicSimp "))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;; Display modes
|
|
|
|
|
(cond ((= calc-number-radix 10) "")
|
|
|
|
|
((= calc-number-radix 2) "Bin ")
|
|
|
|
|
((= calc-number-radix 8) "Oct ")
|
|
|
|
|
((= calc-number-radix 16) "Hex ")
|
|
|
|
|
(t (format "Radix%d " calc-number-radix)))
|
2009-11-20 00:54:19 +00:00
|
|
|
|
(if calc-twos-complement-mode "TwosComp " "")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if calc-leading-zeros "Zero " "")
|
|
|
|
|
(cond ((null calc-language) "")
|
2007-12-11 04:07:28 +00:00
|
|
|
|
((get calc-language 'math-lang-name)
|
|
|
|
|
(concat (get calc-language 'math-lang-name) " "))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(t (concat
|
|
|
|
|
(capitalize (symbol-name calc-language))
|
|
|
|
|
" ")))
|
|
|
|
|
(cond ((eq fmt 'float)
|
|
|
|
|
(if (zerop figs) "" (format "Norm%d " figs)))
|
|
|
|
|
((eq fmt 'fix) (format "Fix%d " figs))
|
|
|
|
|
((eq fmt 'sci)
|
|
|
|
|
(if (zerop figs) "Sci " (format "Sci%d " figs)))
|
|
|
|
|
((eq fmt 'eng)
|
|
|
|
|
(if (zerop figs) "Eng " (format "Eng%d " figs))))
|
|
|
|
|
(cond ((not calc-display-just)
|
|
|
|
|
(if calc-display-origin
|
|
|
|
|
(format "Left%d " calc-display-origin) ""))
|
|
|
|
|
((eq calc-display-just 'right)
|
|
|
|
|
(if calc-display-origin
|
|
|
|
|
(format "Right%d " calc-display-origin)
|
|
|
|
|
"Right "))
|
|
|
|
|
(t
|
|
|
|
|
(if calc-display-origin
|
|
|
|
|
(format "Center%d " calc-display-origin)
|
|
|
|
|
"Center ")))
|
|
|
|
|
(cond ((integerp calc-line-breaking)
|
|
|
|
|
(format "Wid%d " calc-line-breaking))
|
|
|
|
|
(calc-line-breaking "")
|
|
|
|
|
(t "Wide "))
|
|
|
|
|
|
|
|
|
|
;; Miscellaneous other modes/indicators
|
|
|
|
|
(if calc-assoc-selections "" "Break ")
|
|
|
|
|
(cond ((eq calc-mode-save-mode 'save) "Save ")
|
|
|
|
|
((not calc-embedded-info) "")
|
|
|
|
|
((eq calc-mode-save-mode 'local) "Local ")
|
|
|
|
|
((eq calc-mode-save-mode 'edit) "LocEdit ")
|
|
|
|
|
((eq calc-mode-save-mode 'perm) "LocPerm ")
|
|
|
|
|
((eq calc-mode-save-mode 'global) "Global ")
|
|
|
|
|
(t ""))
|
|
|
|
|
(if calc-auto-recompute "" "Manual ")
|
|
|
|
|
(if (and (fboundp 'calc-gnuplot-alive)
|
|
|
|
|
(calc-gnuplot-alive)) "Graph " "")
|
|
|
|
|
(if (and calc-embedded-info
|
|
|
|
|
(> (calc-stack-size) 0)
|
|
|
|
|
(calc-top 1 'sel)) "Sel " "")
|
|
|
|
|
(if calc-display-dirty "Dirty " "")
|
2010-04-16 21:47:25 -05:00
|
|
|
|
(if calc-option-flag "Opt " "")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if calc-inverse-flag "Inv " "")
|
|
|
|
|
(if calc-hyperbolic-flag "Hyp " "")
|
|
|
|
|
(if calc-keep-args-flag "Keep " "")
|
|
|
|
|
(if (/= calc-stack-top 1) "Narrow " "")
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(apply #'concat calc-other-modes)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (equal new-mode-string mode-line-buffer-identification)
|
|
|
|
|
nil
|
|
|
|
|
(setq mode-line-buffer-identification new-mode-string)
|
|
|
|
|
(set-buffer-modified-p (buffer-modified-p))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(and calc-embedded-info (calc-embedded-mode-line-change))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-align-stack-window ()
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(if (derived-mode-p 'calc-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(let ((win (get-buffer-window (current-buffer))))
|
|
|
|
|
(if win
|
|
|
|
|
(progn
|
|
|
|
|
(calc-cursor-stack-index 0)
|
|
|
|
|
(vertical-motion (- 2 (window-height win)))
|
|
|
|
|
(set-window-start win (point)))))
|
|
|
|
|
(calc-cursor-stack-index 0)
|
|
|
|
|
(if (looking-at " *\\.$")
|
|
|
|
|
(goto-char (1- (match-end 0)))))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-select-buffer)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-align-stack-window))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-check-stack (n)
|
|
|
|
|
(if (> n (calc-stack-size))
|
|
|
|
|
(error "Too few elements on stack"))
|
|
|
|
|
(if (< n 0)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(error "Invalid argument")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-push-list (vals &optional m sels)
|
|
|
|
|
(while vals
|
|
|
|
|
(if calc-executing-macro
|
|
|
|
|
(calc-push-list-in-macro vals m sels)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-select-buffer)
|
|
|
|
|
(let* ((val (car vals))
|
|
|
|
|
(entry (list val 1 (car sels)))
|
|
|
|
|
(mm (+ (or m 1) calc-stack-top)))
|
|
|
|
|
(calc-cursor-stack-index (1- (or m 1)))
|
|
|
|
|
(if (> mm 1)
|
|
|
|
|
(setcdr (nthcdr (- mm 2) calc-stack)
|
|
|
|
|
(cons entry (nthcdr (1- mm) calc-stack)))
|
|
|
|
|
(setq calc-stack (cons entry calc-stack)))
|
|
|
|
|
(let ((buffer-read-only nil))
|
|
|
|
|
(insert (math-format-stack-value entry) "\n"))
|
|
|
|
|
(calc-record-undo (list 'push mm))
|
|
|
|
|
(calc-set-command-flag 'renum-stack))))
|
|
|
|
|
(setq vals (cdr vals)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
sels (cdr sels))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-pop-push-list (n vals &optional m sels)
|
|
|
|
|
(if (and calc-any-selections (null sels))
|
|
|
|
|
(calc-replace-selections n vals m)
|
|
|
|
|
(calc-pop-stack n m sels)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-push-list vals m sels)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-pop-push-record-list (n prefix vals &optional m sels)
|
|
|
|
|
(or (and (consp vals)
|
|
|
|
|
(or (integerp (car vals))
|
|
|
|
|
(consp (car vals))))
|
|
|
|
|
(and vals (setq vals (list vals)
|
|
|
|
|
sels (and sels (list sels)))))
|
|
|
|
|
(calc-check-stack (+ n (or m 1) -1))
|
|
|
|
|
(if prefix
|
|
|
|
|
(if (cdr vals)
|
|
|
|
|
(calc-record-list vals prefix)
|
|
|
|
|
(calc-record (car vals) prefix)))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-pop-push-list n vals m sels))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-enter-result (n prefix vals &optional m)
|
|
|
|
|
(setq calc-aborted-prefix prefix)
|
|
|
|
|
(if (and (consp vals)
|
|
|
|
|
(or (integerp (car vals))
|
|
|
|
|
(consp (car vals))))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(setq vals (mapcar #'calc-normalize vals))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq vals (calc-normalize vals)))
|
|
|
|
|
(or (and (consp vals)
|
|
|
|
|
(or (integerp (car vals))
|
|
|
|
|
(consp (car vals))))
|
|
|
|
|
(setq vals (list vals)))
|
|
|
|
|
(if (equal vals '((nil)))
|
|
|
|
|
(setq vals nil))
|
|
|
|
|
(calc-pop-push-record-list n prefix vals m)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-handle-whys))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-normalize (val)
|
|
|
|
|
(if (memq calc-simplify-mode '(nil none num))
|
|
|
|
|
(math-normalize val)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-normalize-fancy val)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-handle-whys ()
|
|
|
|
|
(if calc-next-why
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-do-handle-whys)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun calc-pop-stack (&optional n m sel-ok) ; pop N objs at level M of stack.
|
|
|
|
|
(or n (setq n 1))
|
|
|
|
|
(or m (setq m 1))
|
|
|
|
|
(or calc-keep-args-flag
|
|
|
|
|
(let ((mm (+ m calc-stack-top)))
|
|
|
|
|
(if (and calc-any-selections (not sel-ok)
|
|
|
|
|
(calc-top-selected n m))
|
|
|
|
|
(calc-sel-error))
|
|
|
|
|
(if calc-executing-macro
|
|
|
|
|
(calc-pop-stack-in-macro n mm)
|
|
|
|
|
(calc-record-undo (list 'pop mm (calc-top-list n m 'full)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-select-buffer)
|
|
|
|
|
(let ((buffer-read-only nil))
|
|
|
|
|
(if (> mm 1)
|
|
|
|
|
(progn
|
|
|
|
|
(calc-cursor-stack-index (1- m))
|
|
|
|
|
(let ((bot (point)))
|
|
|
|
|
(calc-cursor-stack-index (+ n m -1))
|
|
|
|
|
(delete-region (point) bot))
|
|
|
|
|
(setcdr (nthcdr (- mm 2) calc-stack)
|
|
|
|
|
(nthcdr (+ n mm -1) calc-stack)))
|
|
|
|
|
(calc-cursor-stack-index n)
|
|
|
|
|
(setq calc-stack (nthcdr n calc-stack))
|
|
|
|
|
(delete-region (point) (point-max))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-set-command-flag 'renum-stack))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2012-09-19 23:44:57 -04:00
|
|
|
|
(defun calc-get-stack-element (x &optional sel-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cond ((eq sel-mode 'entry)
|
|
|
|
|
x)
|
|
|
|
|
((eq sel-mode 'sel)
|
|
|
|
|
(nth 2 x))
|
|
|
|
|
((or (null (nth 2 x))
|
|
|
|
|
(eq sel-mode 'full)
|
|
|
|
|
(not calc-use-selections))
|
|
|
|
|
(car x))
|
|
|
|
|
(sel-mode
|
|
|
|
|
(calc-sel-error))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(t (nth 2 x))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;; Get the Nth element of the stack (N=1 is the top element).
|
|
|
|
|
(defun calc-top (&optional n sel-mode)
|
|
|
|
|
(or n (setq n 1))
|
|
|
|
|
(calc-check-stack n)
|
2012-09-19 23:44:57 -04:00
|
|
|
|
(calc-get-stack-element (nth (+ n calc-stack-top -1) calc-stack) sel-mode))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2012-09-19 23:44:57 -04:00
|
|
|
|
(defun calc-top-n (&optional n sel-mode) ; In case precision has changed.
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-check-complete (calc-normalize (calc-top n sel-mode))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-top-list (&optional n m sel-mode)
|
|
|
|
|
(or n (setq n 1))
|
|
|
|
|
(or m (setq m 1))
|
|
|
|
|
(calc-check-stack (+ n m -1))
|
|
|
|
|
(and (> n 0)
|
|
|
|
|
(let ((top (copy-sequence (nthcdr (+ m calc-stack-top -1)
|
|
|
|
|
calc-stack))))
|
|
|
|
|
(setcdr (nthcdr (1- n) top) nil)
|
2012-09-19 23:44:57 -04:00
|
|
|
|
(nreverse
|
|
|
|
|
(mapcar (lambda (x) (calc-get-stack-element x sel-mode)) top)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-top-list-n (&optional n m sel-mode)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(mapcar #'math-check-complete
|
|
|
|
|
(mapcar #'calc-normalize (calc-top-list n m sel-mode))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun calc-renumber-stack ()
|
|
|
|
|
(if calc-line-numbering
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-cursor-stack-index 0)
|
|
|
|
|
(let ((lnum 1)
|
|
|
|
|
(buffer-read-only nil)
|
|
|
|
|
(stack (nthcdr calc-stack-top calc-stack)))
|
|
|
|
|
(if (re-search-forward "^[0-9]+[:*]" nil t)
|
|
|
|
|
(progn
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(while (re-search-forward "^[0-9]+[:*]" nil t)
|
|
|
|
|
(let ((buffer-read-only nil))
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(delete-char 4)
|
|
|
|
|
(insert " ")))
|
|
|
|
|
(calc-cursor-stack-index 0)))
|
|
|
|
|
(while (re-search-backward "^[0-9]+[:*]" nil t)
|
|
|
|
|
(delete-char 4)
|
|
|
|
|
(if (> lnum 999)
|
|
|
|
|
(insert (format "%03d%s" (% lnum 1000)
|
|
|
|
|
(if (and (nth 2 (car stack))
|
|
|
|
|
calc-use-selections) "*" ":")))
|
|
|
|
|
(let ((prefix (int-to-string lnum)))
|
|
|
|
|
(insert prefix (if (and (nth 2 (car stack))
|
|
|
|
|
calc-use-selections) "*" ":")
|
|
|
|
|
(make-string (- 3 (length prefix)) 32))))
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(setq lnum (1+ lnum)
|
|
|
|
|
stack (cdr stack))))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(and calc-embedded-info (calc-embedded-stack-change)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2002-10-29 00:30:21 +00:00
|
|
|
|
(defvar calc-any-evaltos nil)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-refresh (&optional align)
|
|
|
|
|
(interactive)
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(and (derived-mode-p 'calc-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(not calc-executing-macro)
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(let* ((inhibit-read-only t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(save-point (point))
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(save-mark (ignore-errors (mark)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(save-aligned (looking-at "\\.$"))
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(thing calc-stack)
|
|
|
|
|
(calc-any-evaltos nil))
|
|
|
|
|
(setq calc-any-selections nil)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(erase-buffer)
|
2020-09-10 23:44:16 +02:00
|
|
|
|
(when calc-show-banner
|
|
|
|
|
(calc--header-line "Emacs Calculator Mode" "Emacs Calc"
|
|
|
|
|
(* 2 (/ (window-width) 3)) -3))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(while thing
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(insert (math-format-stack-value (car thing)) "\n")
|
|
|
|
|
(setq thing (cdr thing)))
|
|
|
|
|
(calc-renumber-stack)
|
|
|
|
|
(if calc-display-dirty
|
|
|
|
|
(calc-wrapper (setq calc-display-dirty nil)))
|
|
|
|
|
(and calc-any-evaltos calc-auto-recompute
|
|
|
|
|
(calc-wrapper (calc-refresh-evaltos)))
|
|
|
|
|
(if (or align save-aligned)
|
|
|
|
|
(calc-align-stack-window)
|
|
|
|
|
(goto-char save-point))
|
|
|
|
|
(if save-mark (set-mark save-mark))))
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(and calc-embedded-info (not (derived-mode-p 'calc-mode))
|
* calc/calc.el (calc, calc-refresh, calc-trail-buffer, calc-record)
(calcDigit-nondigit):
* calc/calc-yank.el (calc-copy-to-buffer):
* calc/calc-units.el (calc-invalidate-units-table):
* calc/calc-trail.el (calc-trail-yank):
* calc/calc-store.el (calc-insert-variables):
* calc/calc-rewr.el (math-rewrite, math-rewrite-phase):
* calc/calc-prog.el (calc-read-parse-table):
* calc/calc-keypd.el (calc-do-keypad, calc-keypad-right-click):
* calc/calc-help.el (calc-describe-bindings, calc-describe-key):
* calc/calc-graph.el (calc-graph-delete, calc-graph-add-curve)
(calc-graph-juggle, calc-graph-count-curves, calc-graph-plot)
(calc-graph-plot, calc-graph-format-data, calc-graph-set-styles)
(calc-graph-name, calc-graph-find-command, calc-graph-view)
(calc-graph-view, calc-gnuplot-command, calc-graph-init):
* calc/calc-ext.el (calc-realign):
* calc/calc-embed.el (calc-do-embedded, calc-do-embedded)
(calc-embedded-finish-edit, calc-embedded-make-info)
(calc-embedded-finish-command, calc-embedded-stack-change):
* calc/calc-aent.el (calcAlg-enter): Use with-current-buffer.
2009-10-28 18:35:33 +00:00
|
|
|
|
(with-current-buffer (aref calc-embedded-info 1)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-refresh align)))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(setq calc-refresh-count (1+ calc-refresh-count)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2012-11-21 23:31:45 -08:00
|
|
|
|
;; Dates that are built-in options for `calc-gregorian-switch' should be
|
|
|
|
|
;; (YEAR MONTH DAY math-date-from-gregorian-dt(YEAR MONTH DAY)) for speed.
|
|
|
|
|
(defcustom calc-gregorian-switch nil
|
|
|
|
|
"The first day the Gregorian calendar is used by Calc's date forms.
|
2015-05-21 10:04:45 -07:00
|
|
|
|
This is nil (the default) if the Gregorian calendar is the only one used.
|
2012-11-21 23:31:45 -08:00
|
|
|
|
Otherwise, it should be a list `(YEAR MONTH DAY)' when Calc begins to use
|
|
|
|
|
the Gregorian calendar; Calc will use the Julian calendar for earlier dates.
|
|
|
|
|
The dates in which different regions of the world began to use the
|
|
|
|
|
Gregorian calendar vary quite a bit, even within a single country.
|
|
|
|
|
If you want Calc's date forms to switch between the Julian and
|
|
|
|
|
Gregorian calendar, you can specify the date or choose from several
|
|
|
|
|
common choices. Some of these choices should be taken with a grain
|
|
|
|
|
of salt; for example different parts of France changed calendars at
|
|
|
|
|
different times, and Sweden's change to the Gregorian calendar was
|
|
|
|
|
complicated. Also, the boundaries of the countries were different at
|
|
|
|
|
the times of the calendar changes than they are now.
|
|
|
|
|
The Vatican decided that the Gregorian calendar should take effect
|
|
|
|
|
on 15 October 1582 (Gregorian), and many Catholic countries made
|
2012-11-22 00:09:03 -08:00
|
|
|
|
the change then. Great Britain and its colonies had the Gregorian
|
2012-11-21 23:31:45 -08:00
|
|
|
|
calendar take effect on 14 September 1752 (Gregorian); this includes
|
|
|
|
|
the United States."
|
|
|
|
|
:version "24.4"
|
|
|
|
|
:type '(choice (const :tag "Always use the Gregorian calendar" nil)
|
2012-11-22 00:09:03 -08:00
|
|
|
|
(const :tag "1582-10-15 - Italy, Poland, Portugal, Spain" (1582 10 15 577736))
|
|
|
|
|
(const :tag "1582-12-20 - France" (1582 12 20 577802))
|
|
|
|
|
(const :tag "1582-12-25 - Luxemburg" (1582 12 25 577807))
|
|
|
|
|
(const :tag "1584-01-17 - Bohemia and Moravia" (1584 1 17 578195))
|
|
|
|
|
(const :tag "1587-11-01 - Hungary" (1587 11 1 579579))
|
|
|
|
|
(const :tag "1700-03-01 - Denmark" (1700 3 1 620607))
|
|
|
|
|
(const :tag "1701-01-12 - Protestant Switzerland" (1701 1 12 620924))
|
|
|
|
|
(const :tag "1752-09-14 - Great Britain and dominions" (1752 9 14 639797))
|
|
|
|
|
(const :tag "1753-03-01 - Sweden" (1753 3 1 639965))
|
|
|
|
|
(const :tag "1918-02-14 - Russia" (1918 2 14 700214))
|
|
|
|
|
(const :tag "1919-04-14 - Romania" (1919 4 14 700638))
|
2012-11-21 23:31:45 -08:00
|
|
|
|
(list :tag "(YEAR MONTH DAY)"
|
|
|
|
|
(integer :tag "Year")
|
|
|
|
|
(integer :tag "Month (integer)")
|
|
|
|
|
(integer :tag "Day")))
|
|
|
|
|
:set (lambda (symbol value)
|
|
|
|
|
(set-default symbol value)
|
|
|
|
|
(setq math-format-date-cache nil)
|
|
|
|
|
(calc-refresh)))
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
;;;; The Calc Trail buffer.
|
|
|
|
|
|
|
|
|
|
(defun calc-check-trail-aligned ()
|
|
|
|
|
(save-excursion
|
|
|
|
|
(let ((win (get-buffer-window (current-buffer))))
|
|
|
|
|
(and win
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(pos-visible-in-window-p (1- (point-max)) win)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-trail-buffer ()
|
|
|
|
|
(and (or (null calc-trail-buffer)
|
|
|
|
|
(null (buffer-name calc-trail-buffer)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(setq calc-trail-buffer (get-buffer-create "*Calc Trail*"))
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(let ((buf (or (and (not (derived-mode-p 'calc-mode))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(get-buffer "*Calculator*"))
|
|
|
|
|
(current-buffer))))
|
|
|
|
|
(set-buffer calc-trail-buffer)
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(unless (derived-mode-p 'calc-trail-mode)
|
|
|
|
|
(calc-trail-mode)
|
2020-12-09 09:44:38 +01:00
|
|
|
|
(setq-local calc-main-buffer buf)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or (and calc-trail-pointer
|
|
|
|
|
(eq (marker-buffer calc-trail-pointer) calc-trail-buffer))
|
* calc/calc.el (calc, calc-refresh, calc-trail-buffer, calc-record)
(calcDigit-nondigit):
* calc/calc-yank.el (calc-copy-to-buffer):
* calc/calc-units.el (calc-invalidate-units-table):
* calc/calc-trail.el (calc-trail-yank):
* calc/calc-store.el (calc-insert-variables):
* calc/calc-rewr.el (math-rewrite, math-rewrite-phase):
* calc/calc-prog.el (calc-read-parse-table):
* calc/calc-keypd.el (calc-do-keypad, calc-keypad-right-click):
* calc/calc-help.el (calc-describe-bindings, calc-describe-key):
* calc/calc-graph.el (calc-graph-delete, calc-graph-add-curve)
(calc-graph-juggle, calc-graph-count-curves, calc-graph-plot)
(calc-graph-plot, calc-graph-format-data, calc-graph-set-styles)
(calc-graph-name, calc-graph-find-command, calc-graph-view)
(calc-graph-view, calc-gnuplot-command, calc-graph-init):
* calc/calc-ext.el (calc-realign):
* calc/calc-embed.el (calc-do-embedded, calc-do-embedded)
(calc-embedded-finish-edit, calc-embedded-make-info)
(calc-embedded-finish-command, calc-embedded-stack-change):
* calc/calc-aent.el (calcAlg-enter): Use with-current-buffer.
2009-10-28 18:35:33 +00:00
|
|
|
|
(with-current-buffer calc-trail-buffer
|
2009-08-22 19:29:18 +00:00
|
|
|
|
(goto-char (point-min))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq calc-trail-pointer (point-marker))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
calc-trail-buffer)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(defvar calc-can-abbrev-vectors)
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-record (val &optional prefix)
|
|
|
|
|
(setq calc-aborted-prefix nil)
|
|
|
|
|
(or calc-executing-macro
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(let* ((buf (calc-trail-buffer))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-display-raw nil)
|
|
|
|
|
(calc-can-abbrev-vectors t)
|
|
|
|
|
(fval (if val
|
|
|
|
|
(if (stringp val)
|
|
|
|
|
val
|
|
|
|
|
(math-showing-full-precision
|
|
|
|
|
(math-format-flat-expr val 0)))
|
|
|
|
|
"")))
|
* calc/calc.el (calc, calc-refresh, calc-trail-buffer, calc-record)
(calcDigit-nondigit):
* calc/calc-yank.el (calc-copy-to-buffer):
* calc/calc-units.el (calc-invalidate-units-table):
* calc/calc-trail.el (calc-trail-yank):
* calc/calc-store.el (calc-insert-variables):
* calc/calc-rewr.el (math-rewrite, math-rewrite-phase):
* calc/calc-prog.el (calc-read-parse-table):
* calc/calc-keypd.el (calc-do-keypad, calc-keypad-right-click):
* calc/calc-help.el (calc-describe-bindings, calc-describe-key):
* calc/calc-graph.el (calc-graph-delete, calc-graph-add-curve)
(calc-graph-juggle, calc-graph-count-curves, calc-graph-plot)
(calc-graph-plot, calc-graph-format-data, calc-graph-set-styles)
(calc-graph-name, calc-graph-find-command, calc-graph-view)
(calc-graph-view, calc-gnuplot-command, calc-graph-init):
* calc/calc-ext.el (calc-realign):
* calc/calc-embed.el (calc-do-embedded, calc-do-embedded)
(calc-embedded-finish-edit, calc-embedded-make-info)
(calc-embedded-finish-command, calc-embedded-stack-change):
* calc/calc-aent.el (calcAlg-enter): Use with-current-buffer.
2009-10-28 18:35:33 +00:00
|
|
|
|
(with-current-buffer buf
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((aligned (calc-check-trail-aligned))
|
|
|
|
|
(buffer-read-only nil))
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(cond ((null prefix) (insert " "))
|
|
|
|
|
((and (> (length prefix) 4)
|
Use string-search instead of string-match[-p]
`string-search` is easier to understand, less error-prone, much
faster, does not pollute the regexp cache, and does not mutate global
state. Use it where applicable and obviously safe (erring on the
conservative side).
* admin/authors.el (authors-canonical-file-name)
(authors-scan-change-log):
* lisp/apropos.el (apropos-command)
(apropos-documentation-property, apropos-symbols-internal):
* lisp/arc-mode.el (archive-arc-summarize)
(archive-zoo-summarize):
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-ext.el (math-read-big-expr)
(math-format-nice-expr, math-format-number-fancy):
* lisp/calc/calc-forms.el (math-read-angle-brackets):
* lisp/calc/calc-graph.el (calc-graph-set-range):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-lang.el (tex, latex, math-read-big-rec):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-user-define-permanent, math-define-exp):
* lisp/calc/calc.el (calc-record, calcDigit-key)
(calc-count-lines):
* lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots)
(math-do-integral):
* lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum)
(calc-get-fit-variables):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/java.el (semantic-java-expand-tag):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/cedet/semantic/wisent/python.el
(semantic-python-instance-variable-p):
* lisp/cus-edit.el (get):
* lisp/descr-text.el (describe-text-sexp):
* lisp/dired-aux.el (dired-compress-file):
* lisp/dired-x.el (dired-make-relative-symlink):
* lisp/dired.el (dired-glob-regexp):
* lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list):
* lisp/emacs-lisp/warnings.el (display-warning):
* lisp/emulation/viper-ex.el (viper-ex-read-file-name)
(ex-print-display-lines):
* lisp/env.el (read-envvar-name, setenv):
* lisp/epa-mail.el (epa-mail-encrypt):
* lisp/epg.el (epg--start):
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input):
* lisp/eshell/em-glob.el (eshell-glob-entries):
* lisp/eshell/esh-proc.el (eshell-needs-pipe-p):
* lisp/eshell/esh-util.el (eshell-convert):
* lisp/eshell/esh-var.el (eshell-envvar-names):
* lisp/faces.el (x-resolve-font-name):
* lisp/ffap.el (ffap-file-at-point):
* lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern):
* lisp/forms.el (forms--update):
* lisp/frameset.el (frameset-filter-unshelve-param):
* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc)
(gnus-inews-insert-gcc):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output)
(gnus-search--complete-key-data):
* lisp/gnus/gnus-spec.el (gnus-parse-simple-format):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-extract-address-components)
(gnus-newsgroup-directory-form):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-view):
* lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name):
* lisp/gnus/message.el (message-check-news-header-syntax)
(message-make-message-id, message-user-mail-address)
(message-make-fqdn, message-get-reply-headers, message-followup):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nnheader.el (nnheader-insert):
* lisp/gnus/nnimap.el (nnimap-process-quirk)
(nnimap-imap-ranges-to-gnus-ranges):
* lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix):
* lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path):
* lisp/gnus/nnrss.el (nnrss-match-macro):
* lisp/gnus/nntp.el (nntp-find-group-and-number):
* lisp/help-fns.el (help--symbol-completion-table-affixation):
* lisp/help.el (help-function-arglist):
* lisp/hippie-exp.el (he-concat-directory-file-name):
* lisp/htmlfontify.el (hfy-relstub):
* lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word)
(ido-exhibit):
* lisp/image/image-converter.el (image-convert-p):
* lisp/info-xref.el (info-xref-docstrings):
* lisp/info.el (Info-toc-build, Info-follow-reference)
(Info-backward-node, Info-finder-find-node)
(Info-speedbar-expand-node):
* lisp/international/mule-diag.el (print-fontset-element):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/linum.el (linum-after-change):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rmailkwd.el (rmail-set-label):
* lisp/mail/rmailsum.el (rmail-header-summary):
* lisp/mail/smtpmail.el (smtpmail-maybe-append-domain)
(smtpmail-user-mail-address):
* lisp/mail/uce.el (uce-reply-to-uce):
* lisp/man.el (Man-default-man-entry):
* lisp/mh-e/mh-alias.el (mh-alias-gecos-name)
(mh-alias-minibuffer-confirm-address):
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject):
* lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output):
* lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter)
(mh-folder-completion-function):
* lisp/minibuffer.el (completion--make-envvar-table)
(completion-file-name-table, completion-flex-try-completion)
(completion-flex-all-completions):
* lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p)
(mpc-constraints-tag-lookup):
* lisp/net/ange-ftp.el (ange-ftp-send-cmd)
(ange-ftp-allow-child-lookup):
* lisp/net/mailcap.el (mailcap-mime-types):
* lisp/net/mairix.el (mairix-search-thread-this-article):
* lisp/net/pop3.el (pop3-open-server):
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
* lisp/net/socks.el (socks-filter):
* lisp/nxml/nxml-outln.el (nxml-highlighted-qname):
* lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/obsolete/complete.el (partial-completion-mode)
(PC-do-completion):
* lisp/obsolete/longlines.el (longlines-encode-string):
* lisp/obsolete/nnir.el (nnir-compose-result):
* lisp/obsolete/terminal.el (te-quote-arg-for-sh):
* lisp/obsolete/tpu-edt.el (tpu-check-search-case):
* lisp/obsolete/url-ns.el (isPlainHostName):
* lisp/pcmpl-unix.el (pcomplete/scp):
* lisp/play/dunnet.el (dun-listify-string2, dun-get-path)
(dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface):
* lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment):
* lisp/progmodes/gdb-mi.el (gdb-var-delete)
(gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result):
* lisp/progmodes/gud.el (gud-find-expr):
* lisp/progmodes/idlw-help.el (idlwave-do-context-help1):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-filter-hidden-output, idlwave-shell-filter):
* lisp/progmodes/idlwave.el (idlwave-skip-label-or-case)
(idlwave-routine-info):
* lisp/progmodes/octave.el (inferior-octave-completion-at-point):
* lisp/progmodes/sh-script.el (sh-add-completer):
* lisp/progmodes/sql.el (defun):
* lisp/progmodes/xscheme.el (xscheme-process-filter):
* lisp/replace.el (query-replace-compile-replacement)
(map-query-replace-regexp):
* lisp/shell.el (shell--command-completion-data)
(shell-environment-variable-completion):
* lisp/simple.el (display-message-or-buffer):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/subr.el (split-string-and-unquote):
* lisp/tar-mode.el (tar-extract):
* lisp/term.el (term-command-hook, serial-read-name):
* lisp/textmodes/bibtex.el (bibtex-print-help-message):
* lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter)
(ispell-parse-output, ispell-buffer-local-parsing):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-parse.el (reftex-notice-new):
* lisp/textmodes/reftex-ref.el (reftex-show-entry):
* lisp/textmodes/reftex.el (reftex-compile-variables):
* lisp/textmodes/tex-mode.el (tex-send-command)
(tex-start-tex, tex-append):
* lisp/thingatpt.el (thing-at-point-url-at-point):
* lisp/tmm.el (tmm-add-one-shortcut):
* lisp/transient.el (transient-format-key):
* lisp/url/url-auth.el (url-basic-auth)
(url-digest-auth-directory-id-assoc):
* lisp/url/url-news.el (url-news):
* lisp/url/url-util.el (url-parse-query-string):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/wid-browse.el (widget-browse-sexp):
* lisp/woman.el (woman-parse-colon-path, woman-mini-help)
(WoMan-getpage-in-background, woman-negative-vertical-space):
* lisp/xml.el:
* test/lisp/emacs-lisp/check-declare-tests.el
(check-declare-tests-warn):
* test/lisp/files-tests.el
(files-tests-file-name-non-special-dired-compress-handler):
* test/lisp/net/network-stream-tests.el (server-process-filter):
* test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode):
Use `string-search` instead of `string-match` and `string-match-p`.
2021-08-09 11:20:00 +02:00
|
|
|
|
(string-search " " prefix 4))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(insert (substring prefix 0 4) " "))
|
|
|
|
|
(t (insert (format "%4s " prefix))))
|
|
|
|
|
(insert fval "\n")
|
|
|
|
|
(let ((win (get-buffer-window buf)))
|
|
|
|
|
(if (and aligned win (not (memq 'hold-trail calc-command-flags)))
|
|
|
|
|
(calc-trail-here))
|
|
|
|
|
(goto-char (1- (point-max))))))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
val)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(defun calc-trail-display (flag &optional no-refresh interactive)
|
|
|
|
|
(interactive "P\ni\np")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((win (get-buffer-window (calc-trail-buffer))))
|
|
|
|
|
(if (setq calc-display-trail
|
|
|
|
|
(not (if flag (memq flag '(nil 0)) win)))
|
|
|
|
|
(if (null win)
|
|
|
|
|
(progn
|
2005-05-30 21:03:51 +00:00
|
|
|
|
(if calc-trail-window-hook
|
|
|
|
|
(run-hooks 'calc-trail-window-hook)
|
|
|
|
|
(let ((w (split-window nil (/ (* (window-width) 2) 3) t)))
|
2020-11-14 15:02:13 +02:00
|
|
|
|
(set-window-buffer w calc-trail-buffer)
|
|
|
|
|
(and calc-make-windows-dedicated
|
2021-01-19 06:05:53 +01:00
|
|
|
|
(set-window-dedicated-p w t))))
|
2005-05-30 21:03:51 +00:00
|
|
|
|
(calc-wrapper
|
|
|
|
|
(setq overlay-arrow-string calc-trail-overlay
|
|
|
|
|
overlay-arrow-position calc-trail-pointer)
|
|
|
|
|
(or no-refresh
|
|
|
|
|
(if interactive
|
|
|
|
|
(calc-do-refresh)
|
|
|
|
|
(calc-refresh))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if win
|
|
|
|
|
(progn
|
|
|
|
|
(delete-window win)
|
|
|
|
|
(calc-wrapper
|
|
|
|
|
(or no-refresh
|
2004-10-26 19:05:53 +00:00
|
|
|
|
(if interactive
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-do-refresh)
|
|
|
|
|
(calc-refresh))))))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
calc-trail-buffer)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-trail-here ()
|
|
|
|
|
(interactive)
|
2013-09-10 23:31:56 -04:00
|
|
|
|
(if (derived-mode-p 'calc-trail-mode)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(beginning-of-line)
|
2020-09-10 23:44:16 +02:00
|
|
|
|
(if (eobp)
|
|
|
|
|
(forward-line -1))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (or (bobp) (eobp))
|
|
|
|
|
(setq overlay-arrow-position nil) ; trail is empty
|
|
|
|
|
(set-marker calc-trail-pointer (point) (current-buffer))
|
|
|
|
|
(setq calc-trail-overlay (concat (buffer-substring (point)
|
|
|
|
|
(+ (point) 4))
|
|
|
|
|
">")
|
|
|
|
|
overlay-arrow-string calc-trail-overlay
|
|
|
|
|
overlay-arrow-position calc-trail-pointer)
|
|
|
|
|
(forward-char 4)
|
|
|
|
|
(let ((win (get-buffer-window (current-buffer))))
|
|
|
|
|
(if win
|
|
|
|
|
(save-excursion
|
|
|
|
|
(forward-line (/ (window-height win) 2))
|
2020-09-10 23:44:16 +02:00
|
|
|
|
(forward-line (- 2 (window-height win)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(set-window-start win (point))
|
|
|
|
|
(set-window-point win (+ calc-trail-pointer 4))
|
|
|
|
|
(set-buffer calc-main-buffer)
|
|
|
|
|
(setq overlay-arrow-string calc-trail-overlay
|
|
|
|
|
overlay-arrow-position calc-trail-pointer))))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(error "Not in Calc Trail buffer")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; The Undo list.
|
|
|
|
|
|
|
|
|
|
(defun calc-record-undo (rec)
|
|
|
|
|
(or calc-executing-macro
|
|
|
|
|
(if (memq 'undo calc-command-flags)
|
|
|
|
|
(setq calc-undo-list (cons (cons rec (car calc-undo-list))
|
|
|
|
|
(cdr calc-undo-list)))
|
|
|
|
|
(setq calc-undo-list (cons (list rec) calc-undo-list)
|
|
|
|
|
calc-redo-list nil)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-set-command-flag 'undo))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Arithmetic commands.
|
|
|
|
|
|
|
|
|
|
(defun calc-binary-op (name func arg &optional ident unary func2)
|
|
|
|
|
(setq calc-aborted-prefix name)
|
|
|
|
|
(if (null arg)
|
|
|
|
|
(calc-enter-result 2 name (cons (or func2 func)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(mapcar #'math-check-complete
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-top-list 2))))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-binary-op-fancy name func arg ident unary)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-unary-op (name func arg &optional func2)
|
|
|
|
|
(setq calc-aborted-prefix name)
|
|
|
|
|
(if (null arg)
|
|
|
|
|
(calc-enter-result 1 name (list (or func2 func)
|
|
|
|
|
(math-check-complete (calc-top 1))))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-unary-op-fancy name func arg)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun calc-plus (arg)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-slow-wrapper
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-binary-op "+" 'calcFunc-add arg 0 nil '+)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-minus (arg)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-slow-wrapper
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-binary-op "-" 'calcFunc-sub arg 0 'neg '-)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-times (arg)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-slow-wrapper
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-binary-op "*" 'calcFunc-mul arg 1 nil '*)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-divide (arg)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-slow-wrapper
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-binary-op "/" 'calcFunc-div arg 0 'calcFunc-inv '/)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2005-11-14 20:13:46 +00:00
|
|
|
|
(defun calc-left-divide (arg)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-slow-wrapper
|
|
|
|
|
(calc-binary-op "ldiv" 'calcFunc-ldiv arg 0 nil nil)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-change-sign (arg)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-wrapper
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-unary-op "chs" 'neg arg)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Stack management commands.
|
|
|
|
|
|
|
|
|
|
(defun calc-enter (n)
|
|
|
|
|
(interactive "p")
|
2013-12-19 22:53:24 -06:00
|
|
|
|
(let ((num (if calc-context-sensitive-enter (max 1 (calc-locate-cursor-element (point))))))
|
|
|
|
|
(calc-wrapper
|
|
|
|
|
(cond ((< n 0)
|
|
|
|
|
(calc-push-list (calc-top-list 1 (- n))))
|
|
|
|
|
((= n 0)
|
|
|
|
|
(calc-push-list (calc-top-list (calc-stack-size))))
|
|
|
|
|
(num
|
|
|
|
|
(calc-push-list (calc-top-list n num)))
|
|
|
|
|
(t
|
|
|
|
|
(calc-push-list (calc-top-list n)))))
|
|
|
|
|
(if (and calc-context-sensitive-enter (> n 0)) (calc-cursor-stack-index (+ num n)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-pop (n)
|
|
|
|
|
(interactive "P")
|
2013-12-19 22:53:24 -06:00
|
|
|
|
(let ((num (if calc-context-sensitive-enter (max 1 (calc-locate-cursor-element (point))))))
|
|
|
|
|
(calc-wrapper
|
|
|
|
|
(let* ((nn (prefix-numeric-value n))
|
|
|
|
|
(top (and (null n) (calc-top 1))))
|
|
|
|
|
(cond ((and calc-context-sensitive-enter (> num 1))
|
|
|
|
|
(calc-pop-stack nn num))
|
|
|
|
|
((and (null n)
|
|
|
|
|
(eq (car-safe top) 'incomplete)
|
|
|
|
|
(> (length top) (if (eq (nth 1 top) 'intv) 3 2)))
|
|
|
|
|
(calc-pop-push-list 1 (let ((tt (copy-sequence top)))
|
|
|
|
|
(setcdr (nthcdr (- (length tt) 2) tt) nil)
|
|
|
|
|
(list tt))))
|
|
|
|
|
((< nn 0)
|
|
|
|
|
(if (and calc-any-selections
|
|
|
|
|
(calc-top-selected 1 (- nn)))
|
|
|
|
|
(calc-delete-selection (- nn))
|
|
|
|
|
(calc-pop-stack 1 (- nn) t)))
|
|
|
|
|
((= nn 0)
|
|
|
|
|
(calc-pop-stack (calc-stack-size) 1 t))
|
|
|
|
|
(t
|
|
|
|
|
(if (and calc-any-selections
|
|
|
|
|
(= nn 1)
|
|
|
|
|
(calc-top-selected 1 1))
|
|
|
|
|
(calc-delete-selection 1)
|
|
|
|
|
(calc-pop-stack nn))))))
|
|
|
|
|
(if calc-context-sensitive-enter (calc-cursor-stack-index (1- num)))))
|
2015-08-21 06:31:54 -07:00
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Reading a number using the minibuffer.
|
2015-10-08 08:32:00 -05:00
|
|
|
|
(defun calc-digit-start-entry ()
|
|
|
|
|
(cond ((eq last-command-event ?e)
|
|
|
|
|
(if (> calc-number-radix 14) (format "%d.^" calc-number-radix) "1e"))
|
|
|
|
|
((eq last-command-event ?#) (format "%d#" calc-number-radix))
|
|
|
|
|
((eq last-command-event ?_) "-")
|
|
|
|
|
((eq last-command-event ?@) "0@ ")
|
2015-10-08 08:38:45 -05:00
|
|
|
|
(t (char-to-string last-command-event))))
|
2015-10-08 08:32:00 -05:00
|
|
|
|
|
2020-10-10 16:00:51 -04:00
|
|
|
|
(defvar calc-buffer nil)
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-prev-char)
|
|
|
|
|
(defvar calc-prev-prev-char)
|
|
|
|
|
(defvar calc-digit-value)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calcDigit-start ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(calc-wrapper
|
|
|
|
|
(if (or calc-algebraic-mode
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(and (> calc-number-radix 14) (eq last-command-event ?e)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-alg-digit-entry)
|
|
|
|
|
(setq calc-aborted-prefix nil)
|
|
|
|
|
(let* ((calc-digit-value nil)
|
2020-01-10 19:49:56 +01:00
|
|
|
|
(calc-prev-char last-command-event)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-prev-prev-char nil)
|
|
|
|
|
(calc-buffer (current-buffer))
|
2019-06-19 22:56:26 +02:00
|
|
|
|
(buf
|
|
|
|
|
(let ((old-esc (lookup-key global-map "\e")))
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
|
|
|
|
(define-key global-map "\e" nil)
|
|
|
|
|
(read-from-minibuffer
|
|
|
|
|
"Calc: " (calc-digit-start-entry) calc-digit-map))
|
|
|
|
|
(define-key global-map "\e" old-esc)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or calc-digit-value (setq calc-digit-value (math-read-number buf)))
|
|
|
|
|
(if (stringp calc-digit-value)
|
|
|
|
|
(calc-alg-entry calc-digit-value)
|
|
|
|
|
(if calc-digit-value
|
|
|
|
|
(calc-push-list (list (calc-record (calc-normalize
|
|
|
|
|
calc-digit-value))))))
|
|
|
|
|
(if (eq calc-prev-char 'dots)
|
|
|
|
|
(progn
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-dots)))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2001-11-11 10:33:50 +00:00
|
|
|
|
(defsubst calc-minibuffer-size ()
|
|
|
|
|
(- (point-max) (minibuffer-prompt-end)))
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calcDigit-nondigit ()
|
|
|
|
|
(interactive)
|
|
|
|
|
;; Exercise for the reader: Figure out why this is a good precaution!
|
2020-10-10 16:00:51 -04:00
|
|
|
|
(or calc-buffer
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(use-local-map minibuffer-local-map))
|
2001-11-11 10:33:50 +00:00
|
|
|
|
(let ((str (minibuffer-contents)))
|
* calc/calc.el (calc, calc-refresh, calc-trail-buffer, calc-record)
(calcDigit-nondigit):
* calc/calc-yank.el (calc-copy-to-buffer):
* calc/calc-units.el (calc-invalidate-units-table):
* calc/calc-trail.el (calc-trail-yank):
* calc/calc-store.el (calc-insert-variables):
* calc/calc-rewr.el (math-rewrite, math-rewrite-phase):
* calc/calc-prog.el (calc-read-parse-table):
* calc/calc-keypd.el (calc-do-keypad, calc-keypad-right-click):
* calc/calc-help.el (calc-describe-bindings, calc-describe-key):
* calc/calc-graph.el (calc-graph-delete, calc-graph-add-curve)
(calc-graph-juggle, calc-graph-count-curves, calc-graph-plot)
(calc-graph-plot, calc-graph-format-data, calc-graph-set-styles)
(calc-graph-name, calc-graph-find-command, calc-graph-view)
(calc-graph-view, calc-gnuplot-command, calc-graph-init):
* calc/calc-ext.el (calc-realign):
* calc/calc-embed.el (calc-do-embedded, calc-do-embedded)
(calc-embedded-finish-edit, calc-embedded-make-info)
(calc-embedded-finish-command, calc-embedded-stack-change):
* calc/calc-aent.el (calcAlg-enter): Use with-current-buffer.
2009-10-28 18:35:33 +00:00
|
|
|
|
(setq calc-digit-value (with-current-buffer calc-buffer
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-number str))))
|
2001-11-11 10:33:50 +00:00
|
|
|
|
(if (and (null calc-digit-value) (> (calc-minibuffer-size) 0))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(beep)
|
|
|
|
|
(calc-temp-minibuffer-message " [Bad format]"))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(or (memq last-command-event '(32 13))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn (setq prefix-arg current-prefix-arg)
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(calc-unread-command (if (and (eq last-command-event 27)
|
2009-01-09 05:00:56 +00:00
|
|
|
|
(>= last-input-event 128))
|
|
|
|
|
last-input-event
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(exit-minibuffer)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun calc-minibuffer-contains (rex)
|
|
|
|
|
(save-excursion
|
2001-11-11 10:33:50 +00:00
|
|
|
|
(goto-char (minibuffer-prompt-end))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(looking-at rex)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcDigit-key ()
|
|
|
|
|
(interactive)
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(if (or (and (memq last-command-event '(?+ ?-))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(> (buffer-size) 0)
|
|
|
|
|
(/= (preceding-char) ?e))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(and (memq last-command-event '(?m ?s))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(not (calc-minibuffer-contains "[-+]?[0-9]+\\.?0*[@oh].*"))
|
|
|
|
|
(not (calc-minibuffer-contains "[-+]?\\(1[1-9]\\|[2-9][0-9]\\)#.*"))))
|
|
|
|
|
(calcDigit-nondigit)
|
|
|
|
|
(if (calc-minibuffer-contains "\\([-+]?\\|.* \\)\\'")
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(cond ((memq last-command-event '(?. ?@)) (insert "0"))
|
|
|
|
|
((and (memq last-command-event '(?o ?h ?m))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(not (calc-minibuffer-contains ".*#.*"))) (insert "0"))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
((memq last-command-event '(?: ?e)) (insert "1"))
|
|
|
|
|
((eq last-command-event ?#)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(insert (int-to-string calc-number-radix)))))
|
|
|
|
|
(if (and (calc-minibuffer-contains "\\([-+]?[0-9]+#\\|[^:]*:\\)\\'")
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(eq last-command-event ?:))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(insert "1"))
|
|
|
|
|
(if (and (calc-minibuffer-contains "[-+]?[0-9]+#\\'")
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(eq last-command-event ?.))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(insert "0"))
|
|
|
|
|
(if (and (calc-minibuffer-contains "[-+]?0*\\([2-9]\\|1[0-4]\\)#\\'")
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(eq last-command-event ?e))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(insert "1"))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(if (or (and (memq last-command-event '(?h ?o ?m ?s ?p))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-minibuffer-contains ".*#.*"))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(and (eq last-command-event ?e)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-minibuffer-contains "[-+]?\\(1[5-9]\\|[2-9][0-9]\\)#.*"))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(and (eq last-command-event ?n)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-minibuffer-contains "[-+]?\\(2[4-9]\\|[3-9][0-9]\\)#.*")))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(setq last-command-event (upcase last-command-event)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cond
|
2009-01-09 03:57:12 +00:00
|
|
|
|
((memq last-command-event '(?_ ?n))
|
2002-02-08 12:32:18 +00:00
|
|
|
|
(goto-char (minibuffer-prompt-end))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (and (search-forward " +/- " nil t)
|
|
|
|
|
(not (search-forward "e" nil t)))
|
|
|
|
|
(beep)
|
|
|
|
|
(and (not (calc-minibuffer-contains "[-+]?\\(1[5-9]\\|[2-9][0-9]\\)#.*"))
|
|
|
|
|
(search-forward "e" nil t))
|
Fix regular-expression glitches and typos
Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00085.html
* admin/admin.el (set-version):
* lisp/allout.el (allout-latexify-one-item):
* lisp/arc-mode.el (archive-arc-rename-entry)
(archive-rar-summarize):
* lisp/calc/calc-graph.el (calc-graph-set-styles)
(calc-graph-hide):
* lisp/calc/calc-help.el (calc-describe-key):
* lisp/calc/calc-lang.el (math-compose-tex-func, eqn):
* lisp/calc/calc.el (calcDigit-key):
* lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/comint.el (comint-substitute-in-file-name):
* lisp/dired.el (dired-actual-switches):
* lisp/emacs-lisp/chart.el (chart-rmail-from):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/rx.el (rx-not, rx-atomic-p):
* lisp/emulation/viper-ex.el (viper-get-ex-token)
(viper-get-ex-pat, ex-set-read-variable):
* lisp/epg.el (epg--status-SIG_CREATED):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-user):
(erc-speedbar-expand-channel, erc-speedbar-expand-server)
* lisp/erc/erc.el (erc-is-message-ctcp-and-not-action-p)
(erc-banlist-update):
* lisp/eshell/em-dirs.el (eshell-parse-drive-letter, eshell/pwd):
* lisp/find-dired.el (find-dired):
* lisp/frame.el (frame-set-background-mode):
* lisp/generic-x.el (apache-log-generic-mode):
* lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp):
* lisp/gnus/gnus.el (gnus-short-group-name):
* lisp/gnus/message.el (message-mailer-swallows-blank-line):
* lisp/ibuffer.el (ibuffer-fontification-alist):
* lisp/ido.el (ido-set-matches-1):
* lisp/info-xref.el (info-xref-lock-file-p):
* lisp/info.el (Info-dir-remove-duplicates)
(Info-unescape-quotes, Info-split-parameter-string)
(Info-speedbar-expand-node):
* lisp/international/mule.el (sgml-html-meta-auto-coding-function):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/language/ethio-util.el (ethio-fidel-to-tex-buffer):
* lisp/mail/rmail.el (rmail-collect-deleted):
* lisp/mh-e/mh-alias.el (mh-alias-suggest-alias):
* lisp/mh-e/mh-comp.el (mh-forward):
* lisp/mh-e/mh-search.el (mh-index-next-folder)
(mh-index-create-imenu-index):
* lisp/mh-e/mh-xface.el (mh-picon-get-image):
* lisp/minibuffer.el (completion--embedded-envvar-re):
* lisp/net/ange-ftp.el (ange-ftp-ls-parser):
* lisp/net/goto-addr.el (goto-address-mail-regexp)
(goto-address-find-address-at-point):
* lisp/net/pop3.el (pop3-read-response, pop3-user)
(pop3-pass, pop3-apop):
* lisp/net/tramp.el (tramp-ipv6-regexp)
(tramp-replace-environment-variables):
* lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* lisp/nxml/rng-uri.el (rng-uri-escape-multibyte):
* lisp/nxml/rng-xsd.el (rng-xsd-convert-any-uri):
* lisp/obsolete/pgg.el (pgg-fetch-key):
* lisp/obsolete/vip.el (vip-get-ex-token):
* lisp/org/ob-core.el (org-babel-string-read):
* lisp/org/org-agenda.el:
(org-agenda-add-entry-to-org-agenda-diary-file):
* lisp/org/org-element.el (org-element-keyword-parser):
* lisp/org/org-list.el (org-list-indent-item-generic):
* lisp/org/org-mhe.el (org-mhe-get-message-folder-from-index):
* lisp/org/org-mobile.el (org-mobile-apply):
* lisp/org/org-mouse.el (org-mouse-context-menu):
* lisp/org/org-plot.el (org-plot/gnuplot):
* lisp/org/org-protocol.el (org-protocol-flatten-greedy):
* lisp/org/org-table.el (org-table-copy-down)
(org-table-formula-make-cmp-string)
(org-table-get-stored-formulas, org-table-recalculate)
(org-table-edit-formulas):
* lisp/org/org.el (org-translate-link-from-planner)
(org-fill-line-break-nobreak-p):
* lisp/org/ox-ascii.el (org-ascii-item):
* lisp/org/ox-latex.el (org-latex-clean-invalid-line-breaks):
* lisp/org/ox.el (org-export-expand-include-keyword):
* lisp/progmodes/ada-xref.el (ada-treat-cmd-string):
* lisp/progmodes/cfengine.el (cfengine2-font-lock-keywords):
* lisp/progmodes/cperl-mode.el (cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-fix-line-spacing)
(cperl-have-help-regexp, cperl-word-at-point-hard)
(cperl-make-regexp-x):
* lisp/progmodes/dcl-mode.el (dcl-option-value-offset):
* lisp/progmodes/etags.el (tag-implicit-name-match-p):
* lisp/progmodes/fortran.el (fortran-fill):
* lisp/progmodes/gdb-mi.el (gdb-speedbar-expand-node)
(gdb-locals-handler-custom):
* lisp/progmodes/grep.el (grep-mode-font-lock-keywords):
* lisp/progmodes/gud.el (gud-jdb-find-source-using-classpath):
* lisp/progmodes/js.el (js--continued-expression-p):
* lisp/progmodes/m4-mode.el (m4-font-lock-keywords):
* lisp/progmodes/meta-mode.el (meta-indent-level-count):
* lisp/progmodes/mixal-mode.el (mixal-font-lock-keywords):
* lisp/progmodes/opascal.el (opascal-find-unit-in-directory):
* lisp/progmodes/pascal.el (pascal-progbeg-re):
* lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re)
(ruby-expr-beg, ruby-parse-partial)
(ruby-toggle-string-quotes, ruby-font-lock-keywords):
* lisp/progmodes/sql.el (sql--make-help-docstring):
* lisp/progmodes/verilog-mode.el (verilog-coverpoint-re)
(verilog-skip-forward-comment-p)
(verilog-read-sub-decls-gate)
(verilog-read-auto-template-middle):
* lisp/progmodes/vhdl-mode.el (vhdl-resolve-env-variable)
(vhdl-speedbar-expand-project, vhdl-speedbar-expand-entity)
(vhdl-speedbar-expand-architecture)
(vhdl-speedbar-expand-config, vhdl-speedbar-expand-package)
(vhdl-speedbar-dired):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords):
* lisp/textmodes/flyspell.el (flyspell-debug-signal-word-checked):
* lisp/textmodes/ispell.el (ispell-process-line):
* lisp/textmodes/reftex-cite.el (reftex-end-of-bib-entry):
* lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes):
* lisp/url/url-parse.el (url-generic-parse-url):
* lisp/url/url-util.el (url-truncate-url-for-viewing):
* lisp/vc/diff-mode.el (diff-unified->context):
* lisp/vc/vc-bzr.el (vc-bzr-error-regexp-alist):
* lisp/vc/vc-cvs.el (vc-cvs-parse-status):
* lisp/woman.el (woman0-el, woman-if-ignore)
(woman-change-fonts):
* lisp/xdg.el (xdg--substitute-home-env):
Fix regular-expression infelicities and typos.
Fix regular expression typos
Fix typos reported by Mattias Engdegård in:
that occurred in preloaded modules.
* lisp/frame.el (frame-set-background-mode):
* lisp/international/mule.el (sgml-html-meta-auto-coding-function):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/minibuffer.el (completion--embedded-envvar-re):
2019-03-04 18:00:00 -08:00
|
|
|
|
(if (looking-at "\\+")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(delete-char 1))
|
|
|
|
|
(if (looking-at "-")
|
|
|
|
|
(delete-char 1)
|
2020-08-11 15:40:48 +02:00
|
|
|
|
(insert "-"))))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
((eq last-command-event ?p)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (or (calc-minibuffer-contains ".*\\+/-.*")
|
|
|
|
|
(calc-minibuffer-contains ".*mod.*")
|
|
|
|
|
(calc-minibuffer-contains ".*#.*")
|
|
|
|
|
(calc-minibuffer-contains ".*[-+e:]\\'"))
|
|
|
|
|
(beep)
|
|
|
|
|
(if (not (calc-minibuffer-contains ".* \\'"))
|
|
|
|
|
(insert " "))
|
|
|
|
|
(insert "+/- ")))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
((and (eq last-command-event ?M)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(not (calc-minibuffer-contains
|
|
|
|
|
"[-+]?\\(2[3-9]\\|[3-9][0-9]\\)#.*")))
|
|
|
|
|
(if (or (calc-minibuffer-contains ".*\\+/-.*")
|
|
|
|
|
(calc-minibuffer-contains ".*mod *[^ ]+")
|
|
|
|
|
(calc-minibuffer-contains ".*[-+e:]\\'"))
|
|
|
|
|
(beep)
|
|
|
|
|
(if (calc-minibuffer-contains ".*mod \\'")
|
|
|
|
|
(if calc-previous-modulo
|
|
|
|
|
(insert (math-format-flat-expr calc-previous-modulo 0))
|
|
|
|
|
(beep))
|
|
|
|
|
(if (not (calc-minibuffer-contains ".* \\'"))
|
|
|
|
|
(insert " "))
|
|
|
|
|
(insert "mod "))))
|
|
|
|
|
(t
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(insert (char-to-string last-command-event))
|
2009-11-15 23:58:11 +00:00
|
|
|
|
(if (or (and (calc-minibuffer-contains "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9][0-9]?\\)#[#]?[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\)?\\|.[0-9a-zA-Z]*\\(e[-+]?[0-9]*\\)?\\)?\\'")
|
2005-05-02 19:45:57 +00:00
|
|
|
|
(let ((radix (string-to-number
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(buffer-substring
|
|
|
|
|
(match-beginning 2) (match-end 2)))))
|
|
|
|
|
(and (>= radix 2)
|
|
|
|
|
(<= radix 36)
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(or (memq last-command-event '(?# ?: ?. ?e ?+ ?-))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((dig (math-read-radix-digit
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(upcase last-command-event))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(and dig
|
|
|
|
|
(< dig radix)))))))
|
2001-11-11 10:33:50 +00:00
|
|
|
|
(calc-minibuffer-contains
|
|
|
|
|
"[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9]+\\.?0*[@oh] *\\)?\\([0-9]+\\.?0*['m] *\\)?[0-9]*\\(\\.?[0-9]*\\(e[-+]?[0-3]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?\\)?\\|[0-9]:\\([0-9]+:\\)?[0-9]*\\)?[\"s]?\\'"))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(if (and (memq last-command-event '(?@ ?o ?h ?\' ?m))
|
Use string-search instead of string-match[-p]
`string-search` is easier to understand, less error-prone, much
faster, does not pollute the regexp cache, and does not mutate global
state. Use it where applicable and obviously safe (erring on the
conservative side).
* admin/authors.el (authors-canonical-file-name)
(authors-scan-change-log):
* lisp/apropos.el (apropos-command)
(apropos-documentation-property, apropos-symbols-internal):
* lisp/arc-mode.el (archive-arc-summarize)
(archive-zoo-summarize):
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-ext.el (math-read-big-expr)
(math-format-nice-expr, math-format-number-fancy):
* lisp/calc/calc-forms.el (math-read-angle-brackets):
* lisp/calc/calc-graph.el (calc-graph-set-range):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-lang.el (tex, latex, math-read-big-rec):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-user-define-permanent, math-define-exp):
* lisp/calc/calc.el (calc-record, calcDigit-key)
(calc-count-lines):
* lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots)
(math-do-integral):
* lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum)
(calc-get-fit-variables):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/java.el (semantic-java-expand-tag):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/cedet/semantic/wisent/python.el
(semantic-python-instance-variable-p):
* lisp/cus-edit.el (get):
* lisp/descr-text.el (describe-text-sexp):
* lisp/dired-aux.el (dired-compress-file):
* lisp/dired-x.el (dired-make-relative-symlink):
* lisp/dired.el (dired-glob-regexp):
* lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list):
* lisp/emacs-lisp/warnings.el (display-warning):
* lisp/emulation/viper-ex.el (viper-ex-read-file-name)
(ex-print-display-lines):
* lisp/env.el (read-envvar-name, setenv):
* lisp/epa-mail.el (epa-mail-encrypt):
* lisp/epg.el (epg--start):
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input):
* lisp/eshell/em-glob.el (eshell-glob-entries):
* lisp/eshell/esh-proc.el (eshell-needs-pipe-p):
* lisp/eshell/esh-util.el (eshell-convert):
* lisp/eshell/esh-var.el (eshell-envvar-names):
* lisp/faces.el (x-resolve-font-name):
* lisp/ffap.el (ffap-file-at-point):
* lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern):
* lisp/forms.el (forms--update):
* lisp/frameset.el (frameset-filter-unshelve-param):
* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc)
(gnus-inews-insert-gcc):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output)
(gnus-search--complete-key-data):
* lisp/gnus/gnus-spec.el (gnus-parse-simple-format):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-extract-address-components)
(gnus-newsgroup-directory-form):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-view):
* lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name):
* lisp/gnus/message.el (message-check-news-header-syntax)
(message-make-message-id, message-user-mail-address)
(message-make-fqdn, message-get-reply-headers, message-followup):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nnheader.el (nnheader-insert):
* lisp/gnus/nnimap.el (nnimap-process-quirk)
(nnimap-imap-ranges-to-gnus-ranges):
* lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix):
* lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path):
* lisp/gnus/nnrss.el (nnrss-match-macro):
* lisp/gnus/nntp.el (nntp-find-group-and-number):
* lisp/help-fns.el (help--symbol-completion-table-affixation):
* lisp/help.el (help-function-arglist):
* lisp/hippie-exp.el (he-concat-directory-file-name):
* lisp/htmlfontify.el (hfy-relstub):
* lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word)
(ido-exhibit):
* lisp/image/image-converter.el (image-convert-p):
* lisp/info-xref.el (info-xref-docstrings):
* lisp/info.el (Info-toc-build, Info-follow-reference)
(Info-backward-node, Info-finder-find-node)
(Info-speedbar-expand-node):
* lisp/international/mule-diag.el (print-fontset-element):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/linum.el (linum-after-change):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rmailkwd.el (rmail-set-label):
* lisp/mail/rmailsum.el (rmail-header-summary):
* lisp/mail/smtpmail.el (smtpmail-maybe-append-domain)
(smtpmail-user-mail-address):
* lisp/mail/uce.el (uce-reply-to-uce):
* lisp/man.el (Man-default-man-entry):
* lisp/mh-e/mh-alias.el (mh-alias-gecos-name)
(mh-alias-minibuffer-confirm-address):
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject):
* lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output):
* lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter)
(mh-folder-completion-function):
* lisp/minibuffer.el (completion--make-envvar-table)
(completion-file-name-table, completion-flex-try-completion)
(completion-flex-all-completions):
* lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p)
(mpc-constraints-tag-lookup):
* lisp/net/ange-ftp.el (ange-ftp-send-cmd)
(ange-ftp-allow-child-lookup):
* lisp/net/mailcap.el (mailcap-mime-types):
* lisp/net/mairix.el (mairix-search-thread-this-article):
* lisp/net/pop3.el (pop3-open-server):
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
* lisp/net/socks.el (socks-filter):
* lisp/nxml/nxml-outln.el (nxml-highlighted-qname):
* lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/obsolete/complete.el (partial-completion-mode)
(PC-do-completion):
* lisp/obsolete/longlines.el (longlines-encode-string):
* lisp/obsolete/nnir.el (nnir-compose-result):
* lisp/obsolete/terminal.el (te-quote-arg-for-sh):
* lisp/obsolete/tpu-edt.el (tpu-check-search-case):
* lisp/obsolete/url-ns.el (isPlainHostName):
* lisp/pcmpl-unix.el (pcomplete/scp):
* lisp/play/dunnet.el (dun-listify-string2, dun-get-path)
(dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface):
* lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment):
* lisp/progmodes/gdb-mi.el (gdb-var-delete)
(gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result):
* lisp/progmodes/gud.el (gud-find-expr):
* lisp/progmodes/idlw-help.el (idlwave-do-context-help1):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-filter-hidden-output, idlwave-shell-filter):
* lisp/progmodes/idlwave.el (idlwave-skip-label-or-case)
(idlwave-routine-info):
* lisp/progmodes/octave.el (inferior-octave-completion-at-point):
* lisp/progmodes/sh-script.el (sh-add-completer):
* lisp/progmodes/sql.el (defun):
* lisp/progmodes/xscheme.el (xscheme-process-filter):
* lisp/replace.el (query-replace-compile-replacement)
(map-query-replace-regexp):
* lisp/shell.el (shell--command-completion-data)
(shell-environment-variable-completion):
* lisp/simple.el (display-message-or-buffer):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/subr.el (split-string-and-unquote):
* lisp/tar-mode.el (tar-extract):
* lisp/term.el (term-command-hook, serial-read-name):
* lisp/textmodes/bibtex.el (bibtex-print-help-message):
* lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter)
(ispell-parse-output, ispell-buffer-local-parsing):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-parse.el (reftex-notice-new):
* lisp/textmodes/reftex-ref.el (reftex-show-entry):
* lisp/textmodes/reftex.el (reftex-compile-variables):
* lisp/textmodes/tex-mode.el (tex-send-command)
(tex-start-tex, tex-append):
* lisp/thingatpt.el (thing-at-point-url-at-point):
* lisp/tmm.el (tmm-add-one-shortcut):
* lisp/transient.el (transient-format-key):
* lisp/url/url-auth.el (url-basic-auth)
(url-digest-auth-directory-id-assoc):
* lisp/url/url-news.el (url-news):
* lisp/url/url-util.el (url-parse-query-string):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/wid-browse.el (widget-browse-sexp):
* lisp/woman.el (woman-parse-colon-path, woman-mini-help)
(WoMan-getpage-in-background, woman-negative-vertical-space):
* lisp/xml.el:
* test/lisp/emacs-lisp/check-declare-tests.el
(check-declare-tests-warn):
* test/lisp/files-tests.el
(files-tests-file-name-non-special-dired-compress-handler):
* test/lisp/net/network-stream-tests.el (server-process-filter):
* test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode):
Use `string-search` instead of `string-match` and `string-match-p`.
2021-08-09 11:20:00 +02:00
|
|
|
|
(string-search " " calc-hms-format))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(insert " "))
|
2020-07-22 11:27:15 +02:00
|
|
|
|
(if (and (memq last-command '(calcDigit-start calcDigit-key))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(eq last-command-event ?.))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-digit-dots))
|
Replace Lisp calls to delete-backward-char by delete-char.
* bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
skeleton.el, term.el, time.el, wid-edit.el, woman.el,
calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el,
emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
progmodes/ps-mode.el, progmodes/verilog-mode.el,
progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
delete-backward-char by calls to delete-char.
2010-05-24 22:11:08 -04:00
|
|
|
|
(delete-char -1)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(beep)
|
|
|
|
|
(calc-temp-minibuffer-message " [Bad format]"))))))
|
|
|
|
|
(setq calc-prev-prev-char calc-prev-char
|
2009-01-09 03:57:12 +00:00
|
|
|
|
calc-prev-char last-command-event))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcDigit-backspace ()
|
|
|
|
|
(interactive)
|
2020-08-11 15:40:48 +02:00
|
|
|
|
(cond ((eq last-command 'calcDigit-start)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(erase-buffer))
|
|
|
|
|
(t (backward-delete-char 1)))
|
2001-11-11 10:33:50 +00:00
|
|
|
|
(if (= (calc-minibuffer-size) 0)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(setq last-command-event 13)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calcDigit-nondigit))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;; Arithmetic routines.
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;;
|
|
|
|
|
;; An object as manipulated by one of these routines may take any of the
|
|
|
|
|
;; following forms:
|
|
|
|
|
;;
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
;; integer An integer.
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;;
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
;; (frac NUM DEN) A fraction. NUM and DEN are integers.
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;; Normalized, DEN > 1.
|
|
|
|
|
;;
|
|
|
|
|
;; (float NUM EXP) A floating-point number, NUM * 10^EXP;
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
;; NUM and EXP are integers.
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;; Normalized, NUM is not a multiple of 10, and
|
|
|
|
|
;; abs(NUM) < 10^calc-internal-prec.
|
|
|
|
|
;; Normalized zero is stored as (float 0 0).
|
|
|
|
|
;;
|
|
|
|
|
;; (cplx REAL IMAG) A complex number; REAL and IMAG are any of above.
|
|
|
|
|
;; Normalized, IMAG is nonzero.
|
|
|
|
|
;;
|
|
|
|
|
;; (polar R THETA) Polar complex number. Normalized, R > 0 and THETA
|
|
|
|
|
;; is neither zero nor 180 degrees (pi radians).
|
|
|
|
|
;;
|
|
|
|
|
;; (vec A B C ...) Vector of objects A, B, C, ... A matrix is a
|
|
|
|
|
;; vector of vectors.
|
|
|
|
|
;;
|
|
|
|
|
;; (hms H M S) Angle in hours-minutes-seconds form. All three
|
|
|
|
|
;; components have the same sign; H and M must be
|
|
|
|
|
;; numerically integers; M and S are expected to
|
|
|
|
|
;; lie in the range [0,60).
|
|
|
|
|
;;
|
|
|
|
|
;; (date N) A date or date/time object. N is an integer to
|
|
|
|
|
;; store a date only, or a fraction or float to
|
|
|
|
|
;; store a date and time.
|
|
|
|
|
;;
|
|
|
|
|
;; (sdev X SIGMA) Error form, X +/- SIGMA. When normalized,
|
|
|
|
|
;; SIGMA > 0. X is any complex number and SIGMA
|
|
|
|
|
;; is real numbers; or these may be symbolic
|
|
|
|
|
;; expressions where SIGMA is assumed real.
|
|
|
|
|
;;
|
|
|
|
|
;; (intv MASK LO HI) Interval form. MASK is 0=(), 1=(], 2=[), or 3=[].
|
|
|
|
|
;; LO and HI are any real numbers, or symbolic
|
|
|
|
|
;; expressions which are assumed real, and LO < HI.
|
|
|
|
|
;; For [LO..HI], if LO = HI normalization produces LO,
|
|
|
|
|
;; and if LO > HI normalization produces [LO..LO).
|
|
|
|
|
;; For other intervals, if LO > HI normalization
|
|
|
|
|
;; sets HI equal to LO.
|
|
|
|
|
;;
|
|
|
|
|
;; (mod N M) Number modulo M. When normalized, 0 <= N < M.
|
|
|
|
|
;; N and M are real numbers.
|
|
|
|
|
;;
|
|
|
|
|
;; (var V S) Symbolic variable. V is a Lisp symbol which
|
|
|
|
|
;; represents the variable's visible name. S is
|
|
|
|
|
;; the symbol which actually stores the variable's
|
|
|
|
|
;; value: (var pi var-pi).
|
|
|
|
|
;;
|
|
|
|
|
;; In general, combining rational numbers in a calculation always produces
|
|
|
|
|
;; a rational result, but if either argument is a float, result is a float.
|
|
|
|
|
|
|
|
|
|
;; In the following comments, [x y z] means result is x, args must be y, z,
|
|
|
|
|
;; respectively, where the code letters are:
|
|
|
|
|
;;
|
|
|
|
|
;; O Normalized object (vector or number)
|
|
|
|
|
;; V Normalized vector
|
|
|
|
|
;; N Normalized number of any type
|
|
|
|
|
;; N Normalized complex number
|
|
|
|
|
;; R Normalized real number (float or rational)
|
|
|
|
|
;; F Normalized floating-point number
|
|
|
|
|
;; T Normalized rational number
|
|
|
|
|
;; I Normalized integer
|
|
|
|
|
;; B Normalized big integer
|
|
|
|
|
;; S Normalized small integer
|
|
|
|
|
;; D Digit (small integer, 0..999)
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
;; L normalized vector element list (without "vec")
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;; P Predicate (truth value)
|
|
|
|
|
;; X Any Lisp object
|
|
|
|
|
;; Z "nil"
|
|
|
|
|
;;
|
|
|
|
|
;; Lower-case letters signify possibly un-normalized values.
|
|
|
|
|
;; "L.D" means a cons of an L and a D.
|
|
|
|
|
;; [N N; n n] means result will be normalized if argument is.
|
|
|
|
|
;; Also, [Public] marks routines intended to be called from outside.
|
|
|
|
|
;; [This notation has been neglected in many recent routines.]
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar math-eval-rules-cache)
|
|
|
|
|
(defvar math-eval-rules-cache-other)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
;;; Reduce an object to canonical (normalized) form. [O o; Z Z] [Public]
|
2004-11-09 20:30:10 +00:00
|
|
|
|
|
2012-07-29 13:51:16 -05:00
|
|
|
|
(defvar math-normalize-error nil
|
|
|
|
|
"Non-nil if the last call the `math-normalize' returned an error.")
|
|
|
|
|
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(defun math-normalize (a)
|
2012-07-29 13:51:16 -05:00
|
|
|
|
(setq math-normalize-error nil)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cond
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
((not (consp a)) a)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
((eq (car a) 'float)
|
|
|
|
|
(math-make-float (math-normalize (nth 1 a))
|
|
|
|
|
(nth 2 a)))
|
|
|
|
|
((or (memq (car a)
|
2004-11-09 20:30:10 +00:00
|
|
|
|
'(frac cplx polar hms date mod sdev intv vec var quote
|
|
|
|
|
special-const calcFunc-if calcFunc-lambda
|
|
|
|
|
calcFunc-quote calcFunc-condition
|
|
|
|
|
calcFunc-evalto))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(integerp (car a))
|
|
|
|
|
(and (consp (car a))
|
|
|
|
|
(not (eq (car (car a)) 'lambda))))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(math-normalize-fancy a))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(t
|
|
|
|
|
(or (and calc-simplify-mode
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(math-normalize-nonstandard a))
|
|
|
|
|
(let ((args (mapcar #'math-normalize (cdr a))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or (condition-case err
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(let ((func
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(assq (car a) '( ( + . math-add )
|
|
|
|
|
( - . math-sub )
|
|
|
|
|
( * . math-mul )
|
|
|
|
|
( / . math-div )
|
|
|
|
|
( % . math-mod )
|
|
|
|
|
( ^ . math-pow )
|
|
|
|
|
( neg . math-neg )
|
|
|
|
|
( | . math-concat ) ))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or (and var-EvalRules
|
|
|
|
|
(progn
|
|
|
|
|
(or (eq var-EvalRules math-eval-rules-cache-tag)
|
|
|
|
|
(progn
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-recompile-eval-rules)))
|
|
|
|
|
(and (or math-eval-rules-cache-other
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(assq (car a)
|
2004-11-09 20:30:10 +00:00
|
|
|
|
math-eval-rules-cache))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-apply-rewrites
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cdr math-eval-rules-cache)
|
|
|
|
|
nil math-eval-rules-cache))))
|
|
|
|
|
(if func
|
|
|
|
|
(apply (cdr func) args)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(and (or (consp (car a))
|
|
|
|
|
(fboundp (car a))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(and (not (featurep 'calc-ext))
|
|
|
|
|
(require 'calc-ext)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(fboundp (car a))))
|
|
|
|
|
(apply (car a) args)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(wrong-number-of-arguments
|
2012-07-29 13:51:16 -05:00
|
|
|
|
(setq math-normalize-error t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-record-why "*Wrong number of arguments"
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil)
|
|
|
|
|
(wrong-type-argument
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(or calc-next-why
|
2004-11-09 20:30:10 +00:00
|
|
|
|
(calc-record-why "Wrong type of argument"
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil)
|
|
|
|
|
(args-out-of-range
|
2012-07-29 13:51:16 -05:00
|
|
|
|
(setq math-normalize-error t)
|
2007-09-26 00:09:32 +00:00
|
|
|
|
(calc-record-why "*Argument out of range"
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil)
|
|
|
|
|
(inexact-result
|
|
|
|
|
(calc-record-why "No exact representation for result"
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil)
|
|
|
|
|
(math-overflow
|
2012-07-29 13:51:16 -05:00
|
|
|
|
(setq math-normalize-error t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-record-why "*Floating-point overflow occurred"
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil)
|
|
|
|
|
(math-underflow
|
2012-07-29 13:51:16 -05:00
|
|
|
|
(setq math-normalize-error t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-record-why "*Floating-point underflow occurred"
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil)
|
|
|
|
|
(void-variable
|
2012-07-29 13:51:16 -05:00
|
|
|
|
(setq math-normalize-error t)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (eq (nth 1 err) 'var-EvalRules)
|
|
|
|
|
(progn
|
|
|
|
|
(setq var-EvalRules nil)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(math-normalize (cons (car a) args)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-record-why "*Variable is void" (nth 1 err)))))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(if (consp (car a))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-dimension-error)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) args))))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;; True if A is a floating-point real or complex number. [P x] [Public]
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-floatp (a)
|
|
|
|
|
(cond ((eq (car-safe a) 'float) t)
|
|
|
|
|
((memq (car-safe a) '(cplx polar mod sdev intv))
|
|
|
|
|
(or (math-floatp (nth 1 a))
|
|
|
|
|
(math-floatp (nth 2 a))
|
|
|
|
|
(and (eq (car a) 'intv) (math-floatp (nth 3 a)))))
|
|
|
|
|
((eq (car-safe a) 'date)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-floatp (nth 1 a)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;; Verify that A is a complete object and return A. [x x] [Public]
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-check-complete (a)
|
|
|
|
|
(cond ((integerp a) a)
|
|
|
|
|
((eq (car-safe a) 'incomplete)
|
|
|
|
|
(calc-incomplete-error a))
|
|
|
|
|
((consp a) a)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(t (error "Invalid data object encountered"))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2009-08-30 05:12:46 +00:00
|
|
|
|
;; Build a normalized floating-point number. [F I S]
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-make-float (mant exp)
|
|
|
|
|
(if (eq mant 0)
|
|
|
|
|
'(float 0 0)
|
|
|
|
|
(let* ((ldiff (- calc-internal-prec (math-numdigs mant))))
|
|
|
|
|
(if (< ldiff 0)
|
|
|
|
|
(setq mant (math-scale-rounding mant ldiff)
|
|
|
|
|
exp (- exp ldiff))))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(while (= (% mant 10) 0)
|
|
|
|
|
(setq mant (/ mant 10)
|
|
|
|
|
exp (1+ exp)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (and (<= exp -4000000)
|
|
|
|
|
(<= (+ exp (math-numdigs mant) -1) -4000000))
|
|
|
|
|
(signal 'math-underflow nil)
|
|
|
|
|
(if (and (>= exp 3000000)
|
|
|
|
|
(>= (+ exp (math-numdigs mant) -1) 4000000))
|
|
|
|
|
(signal 'math-overflow nil)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(list 'float mant exp)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Coerce A to be a float. [F N; V V] [Public]
|
|
|
|
|
(defun math-float (a)
|
|
|
|
|
(cond ((Math-integerp a) (math-make-float a 0))
|
|
|
|
|
((eq (car a) 'frac) (math-div (math-float (nth 1 a)) (nth 2 a)))
|
|
|
|
|
((eq (car a) 'float) a)
|
|
|
|
|
((memq (car a) '(cplx polar vec hms date sdev mod))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) (mapcar #'math-float (cdr a))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(t (math-float-fancy a))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun math-neg (a)
|
|
|
|
|
(cond ((not (consp a)) (- a))
|
|
|
|
|
((memq (car a) '(frac float))
|
|
|
|
|
(list (car a) (Math-integer-neg (nth 1 a)) (nth 2 a)))
|
|
|
|
|
((memq (car a) '(cplx vec hms date calcFunc-idn))
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(cons (car a) (mapcar #'math-neg (cdr a))))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(t (math-neg-fancy a))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Compute the number of decimal digits in integer A. [S I]
|
|
|
|
|
(defun math-numdigs (a)
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(cond
|
|
|
|
|
((= a 0) 0)
|
|
|
|
|
((progn (when (< a 0) (setq a (- a)))
|
|
|
|
|
(>= a 100))
|
|
|
|
|
(let* ((bd (logb a))
|
|
|
|
|
(d (truncate (/ bd (eval-when-compile (log 10 2))))))
|
|
|
|
|
(let ((b (expt 10 d)))
|
|
|
|
|
(cond
|
|
|
|
|
((> b a) d)
|
|
|
|
|
((> (* 10 b) a) (1+ d))
|
|
|
|
|
(t (+ d 2))))))
|
|
|
|
|
((>= a 10) 2)
|
|
|
|
|
(t 1)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Multiply (with truncation toward 0) the integer A by 10^N. [I i S]
|
|
|
|
|
(defun math-scale-int (a n)
|
|
|
|
|
(cond ((= n 0) a)
|
|
|
|
|
((> n 0) (math-scale-left a n))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(t (math-normalize (math-scale-right a (- n))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-scale-left (a n) ; [I I S]
|
|
|
|
|
(if (= n 0)
|
|
|
|
|
a
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(* a (expt 10 n))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-scale-right (a n) ; [i i S]
|
|
|
|
|
(if (= n 0)
|
|
|
|
|
a
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(if (<= a 0)
|
|
|
|
|
(if (= a 0)
|
|
|
|
|
0
|
|
|
|
|
(- (math-scale-right (- a) n)))
|
|
|
|
|
(if (> n 0)
|
|
|
|
|
(/ a (expt 10 n))
|
|
|
|
|
a))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Multiply (with rounding) the integer A by 10^N. [I i S]
|
|
|
|
|
(defun math-scale-rounding (a n)
|
|
|
|
|
(cond ((>= n 0)
|
|
|
|
|
(math-scale-left a n))
|
|
|
|
|
(t
|
|
|
|
|
(if (< a 0)
|
|
|
|
|
(- (math-scale-rounding (- a) n))
|
|
|
|
|
(if (= n -1)
|
|
|
|
|
(/ (+ a 5) 10)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(/ (+ (math-scale-right a (- -1 n)) 5) 10))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Compute the sum of A and B. [O O O] [Public]
|
|
|
|
|
(defun math-add (a b)
|
|
|
|
|
(or
|
|
|
|
|
(and (not (or (consp a) (consp b)))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(+ a b))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(and (Math-zerop a) (not (eq (car-safe a) 'mod))
|
|
|
|
|
(if (and (math-floatp a) (Math-ratp b)) (math-float b) b))
|
|
|
|
|
(and (Math-zerop b) (not (eq (car-safe b) 'mod))
|
|
|
|
|
(if (and (math-floatp b) (Math-ratp a)) (math-float a) a))
|
|
|
|
|
(and (Math-objvecp a) (Math-objvecp b)
|
|
|
|
|
(or
|
|
|
|
|
(and (Math-ratp a) (Math-ratp b)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-add-fractions a b))
|
|
|
|
|
(and (Math-realp a) (Math-realp b)
|
|
|
|
|
(progn
|
|
|
|
|
(or (and (consp a) (eq (car a) 'float))
|
|
|
|
|
(setq a (math-float a)))
|
|
|
|
|
(or (and (consp b) (eq (car b) 'float))
|
|
|
|
|
(setq b (math-float b)))
|
|
|
|
|
(math-add-float a b)))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(and (require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-add-objects-fancy a b))))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(and (require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-add-symb-fancy a b))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-add-float (a b) ; [F F F]
|
|
|
|
|
(let ((ediff (- (nth 2 a) (nth 2 b))))
|
|
|
|
|
(if (>= ediff 0)
|
|
|
|
|
(if (>= ediff (+ calc-internal-prec calc-internal-prec))
|
|
|
|
|
a
|
|
|
|
|
(math-make-float (math-add (nth 1 b)
|
|
|
|
|
(if (eq ediff 0)
|
|
|
|
|
(nth 1 a)
|
|
|
|
|
(math-scale-left (nth 1 a) ediff)))
|
|
|
|
|
(nth 2 b)))
|
|
|
|
|
(if (>= (setq ediff (- ediff))
|
|
|
|
|
(+ calc-internal-prec calc-internal-prec))
|
|
|
|
|
b
|
|
|
|
|
(math-make-float (math-add (nth 1 a)
|
|
|
|
|
(math-scale-left (nth 1 b) ediff))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(nth 2 a))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Compute the difference of A and B. [O O O] [Public]
|
|
|
|
|
(defun math-sub (a b)
|
|
|
|
|
(if (or (consp a) (consp b))
|
|
|
|
|
(math-add a (math-neg b))
|
|
|
|
|
(setq a (- a b))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
a))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-sub-float (a b) ; [F F F]
|
|
|
|
|
(let ((ediff (- (nth 2 a) (nth 2 b))))
|
|
|
|
|
(if (>= ediff 0)
|
|
|
|
|
(if (>= ediff (+ calc-internal-prec calc-internal-prec))
|
|
|
|
|
a
|
|
|
|
|
(math-make-float (math-add (Math-integer-neg (nth 1 b))
|
|
|
|
|
(if (eq ediff 0)
|
|
|
|
|
(nth 1 a)
|
|
|
|
|
(math-scale-left (nth 1 a) ediff)))
|
|
|
|
|
(nth 2 b)))
|
|
|
|
|
(if (>= (setq ediff (- ediff))
|
|
|
|
|
(+ calc-internal-prec calc-internal-prec))
|
|
|
|
|
b
|
|
|
|
|
(math-make-float (math-add (nth 1 a)
|
|
|
|
|
(Math-integer-neg
|
|
|
|
|
(math-scale-left (nth 1 b) ediff)))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(nth 2 a))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Compute the product of A and B. [O O O] [Public]
|
|
|
|
|
(defun math-mul (a b)
|
|
|
|
|
(or
|
|
|
|
|
(and (not (consp a)) (not (consp b))
|
|
|
|
|
(* a b))
|
|
|
|
|
(and (Math-zerop a) (not (eq (car-safe b) 'mod))
|
|
|
|
|
(if (Math-scalarp b)
|
|
|
|
|
(if (and (math-floatp b) (Math-ratp a)) (math-float a) a)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-mul-zero a b)))
|
|
|
|
|
(and (Math-zerop b) (not (eq (car-safe a) 'mod))
|
|
|
|
|
(if (Math-scalarp a)
|
|
|
|
|
(if (and (math-floatp a) (Math-ratp b)) (math-float b) b)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-mul-zero b a)))
|
|
|
|
|
(and (Math-objvecp a) (Math-objvecp b)
|
|
|
|
|
(or
|
|
|
|
|
(and (Math-ratp a) (Math-ratp b)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-mul-fractions a b))
|
|
|
|
|
(and (Math-realp a) (Math-realp b)
|
|
|
|
|
(progn
|
|
|
|
|
(or (and (consp a) (eq (car a) 'float))
|
|
|
|
|
(setq a (math-float a)))
|
|
|
|
|
(or (and (consp b) (eq (car b) 'float))
|
|
|
|
|
(setq b (math-float b)))
|
|
|
|
|
(math-make-float (math-mul (nth 1 a) (nth 1 b))
|
|
|
|
|
(+ (nth 2 a) (nth 2 b)))))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(and (require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-mul-objects-fancy a b))))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(and (require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-mul-symb-fancy a b))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-infinitep (a &optional undir)
|
|
|
|
|
(while (and (consp a) (memq (car a) '(* / neg)))
|
|
|
|
|
(if (or (not (eq (car a) '*)) (math-infinitep (nth 1 a)))
|
|
|
|
|
(setq a (nth 1 a))
|
|
|
|
|
(setq a (nth 2 a))))
|
|
|
|
|
(and (consp a)
|
|
|
|
|
(eq (car a) 'var)
|
|
|
|
|
(memq (nth 2 a) '(var-inf var-uinf var-nan))
|
|
|
|
|
(if (and undir (eq (nth 2 a) 'var-inf))
|
|
|
|
|
'(var uinf var-uinf)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
a)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Compute the integer (quotient . remainder) of A and B, which may be
|
|
|
|
|
;;; small or big integers. Type and consistency of truncation is undefined
|
|
|
|
|
;;; if A or B is negative. B must be nonzero. [I.I I I] [Public]
|
|
|
|
|
(defun math-idivmod (a b)
|
|
|
|
|
(if (eq b 0)
|
|
|
|
|
(math-reject-arg a "*Division by zero"))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(cons (/ a b) (% a b)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-quotient (a b) ; [I I I] [Public]
|
|
|
|
|
(if (and (not (consp a)) (not (consp b)))
|
|
|
|
|
(if (= b 0)
|
|
|
|
|
(math-reject-arg a "*Division by zero")
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(/ a b))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Compute the quotient of A and B. [O O N] [Public]
|
|
|
|
|
(defun math-div (a b)
|
|
|
|
|
(or
|
|
|
|
|
(and (Math-zerop b)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-div-by-zero a b))
|
|
|
|
|
(and (Math-zerop a) (not (eq (car-safe b) 'mod))
|
|
|
|
|
(if (Math-scalarp b)
|
|
|
|
|
(if (and (math-floatp b) (Math-ratp a)) (math-float a) a)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-div-zero a b)))
|
|
|
|
|
(and (Math-objvecp a) (Math-objvecp b)
|
|
|
|
|
(or
|
|
|
|
|
(and (Math-integerp a) (Math-integerp b)
|
|
|
|
|
(let ((q (math-idivmod a b)))
|
|
|
|
|
(if (eq (cdr q) 0)
|
|
|
|
|
(car q)
|
|
|
|
|
(if calc-prefer-frac
|
|
|
|
|
(progn
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-make-frac a b))
|
|
|
|
|
(math-div-float (math-make-float a 0)
|
|
|
|
|
(math-make-float b 0))))))
|
|
|
|
|
(and (Math-ratp a) (Math-ratp b)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-div-fractions a b))
|
|
|
|
|
(and (Math-realp a) (Math-realp b)
|
|
|
|
|
(progn
|
|
|
|
|
(or (and (consp a) (eq (car a) 'float))
|
|
|
|
|
(setq a (math-float a)))
|
|
|
|
|
(or (and (consp b) (eq (car b) 'float))
|
|
|
|
|
(setq b (math-float b)))
|
|
|
|
|
(math-div-float a b)))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(and (require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-div-objects-fancy a b))))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(and (require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-div-symb-fancy a b))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-div-float (a b) ; [F F F]
|
|
|
|
|
(let ((ldiff (max (- (1+ calc-internal-prec)
|
|
|
|
|
(- (math-numdigs (nth 1 a)) (math-numdigs (nth 1 b))))
|
|
|
|
|
0)))
|
|
|
|
|
(math-make-float (math-quotient (math-scale-int (nth 1 a) ldiff) (nth 1 b))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(- (- (nth 2 a) (nth 2 b)) ldiff))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
2020-08-11 15:40:48 +02:00
|
|
|
|
(defun calcDigit-delchar ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(cond ((looking-at-p " \\+/- \\'")
|
|
|
|
|
(delete-char 5))
|
|
|
|
|
((looking-at-p " mod \\'")
|
|
|
|
|
(delete-char 5))
|
|
|
|
|
((looking-at-p " \\'")
|
|
|
|
|
(delete-char 2))
|
|
|
|
|
((eq last-command 'calcDigit-start)
|
|
|
|
|
(erase-buffer))
|
|
|
|
|
(t (unless (eobp) (delete-char 1))))
|
|
|
|
|
(when (= (calc-minibuffer-size) 0)
|
|
|
|
|
(setq last-command-event 13)
|
|
|
|
|
(calcDigit-nondigit)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
2020-03-23 21:34:22 +01:00
|
|
|
|
(defvar math-comp-selected)
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(defvar calc-selection-cache-entry)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
;;; Format the number A as a string. [X N; X Z] [Public]
|
|
|
|
|
(defun math-format-stack-value (entry)
|
|
|
|
|
(setq calc-selection-cache-entry calc-selection-cache-default-entry)
|
|
|
|
|
(let* ((a (car entry))
|
|
|
|
|
(math-comp-selected (nth 2 entry))
|
|
|
|
|
(c (cond ((null a) "<nil>")
|
|
|
|
|
((eq calc-display-raw t) (format "%s" a))
|
|
|
|
|
((stringp a) a)
|
2002-06-12 05:11:22 +00:00
|
|
|
|
((eq a 'top-of-stack) (propertize "." 'font-lock-face 'bold))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-prepared-composition
|
|
|
|
|
calc-prepared-composition)
|
|
|
|
|
((and (Math-scalarp a)
|
|
|
|
|
(memq calc-language '(nil flat unform))
|
|
|
|
|
(null math-comp-selected))
|
|
|
|
|
(math-format-number a))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(t (require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-compose-expr a 0))))
|
|
|
|
|
(off (math-stack-value-offset c))
|
|
|
|
|
s w)
|
|
|
|
|
(and math-comp-selected (setq calc-any-selections t))
|
|
|
|
|
(setq w (cdr off)
|
|
|
|
|
off (car off))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when (> off 0)
|
2005-07-04 02:39:37 +00:00
|
|
|
|
(setq c (math-comp-concat (make-string off ?\s) c)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or (equal calc-left-label "")
|
|
|
|
|
(setq c (math-comp-concat (if (eq a 'top-of-stack)
|
2005-07-04 02:39:37 +00:00
|
|
|
|
(make-string (length calc-left-label) ?\s)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
calc-left-label)
|
|
|
|
|
c)))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when calc-line-numbering
|
|
|
|
|
(setq c (math-comp-concat (if (eq calc-language 'big)
|
2002-08-05 09:34:12 +00:00
|
|
|
|
(if math-comp-selected
|
|
|
|
|
'(tag t "1: ")
|
|
|
|
|
"1: ")
|
2002-06-12 05:11:22 +00:00
|
|
|
|
" ")
|
|
|
|
|
c)))
|
|
|
|
|
(unless (or (equal calc-right-label "")
|
|
|
|
|
(eq a 'top-of-stack))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(setq c (list 'horiz c
|
|
|
|
|
(make-string (max (- w (math-comp-width c)
|
2005-07-04 02:39:37 +00:00
|
|
|
|
(length calc-right-label)) 0) ?\s)
|
2002-06-12 05:11:22 +00:00
|
|
|
|
'(break -1)
|
|
|
|
|
calc-right-label)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq s (if (stringp c)
|
|
|
|
|
(if calc-display-raw
|
|
|
|
|
(prin1-to-string c)
|
|
|
|
|
c)
|
|
|
|
|
(math-composition-to-string c w)))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when calc-language-output-filter
|
|
|
|
|
(setq s (funcall calc-language-output-filter s)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (eq calc-language 'big)
|
|
|
|
|
(setq s (concat s "\n"))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when calc-line-numbering
|
2004-03-26 15:29:13 +00:00
|
|
|
|
(setq s (concat "1:" (substring s 2)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setcar (cdr entry) (calc-count-lines s))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
s))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
;; The variables math-svo-wid and math-svo-off are local
|
2004-11-24 06:01:45 +00:00
|
|
|
|
;; to math-stack-value-offset, but are used by math-stack-value-offset-fancy
|
|
|
|
|
;; in calccomp.el.
|
|
|
|
|
|
2015-10-08 22:25:38 -04:00
|
|
|
|
(defvar math-svo-wid)
|
|
|
|
|
(defvar math-svo-off)
|
|
|
|
|
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(defun math-stack-value-offset (c)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let* ((num (if calc-line-numbering 4 0))
|
2004-11-24 06:01:45 +00:00
|
|
|
|
(math-svo-wid (calc-window-width))
|
|
|
|
|
math-svo-off)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if calc-display-just
|
|
|
|
|
(progn
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(math-stack-value-offset-fancy c))
|
2004-11-24 06:01:45 +00:00
|
|
|
|
(setq math-svo-off (or calc-display-origin 0))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when (integerp calc-line-breaking)
|
2004-11-24 06:01:45 +00:00
|
|
|
|
(setq math-svo-wid calc-line-breaking)))
|
|
|
|
|
(cons (max (- math-svo-off (length calc-left-label)) 0)
|
|
|
|
|
(+ math-svo-wid num))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-count-lines (s)
|
|
|
|
|
(let ((pos 0)
|
|
|
|
|
(num 1))
|
Use string-search instead of string-match[-p]
`string-search` is easier to understand, less error-prone, much
faster, does not pollute the regexp cache, and does not mutate global
state. Use it where applicable and obviously safe (erring on the
conservative side).
* admin/authors.el (authors-canonical-file-name)
(authors-scan-change-log):
* lisp/apropos.el (apropos-command)
(apropos-documentation-property, apropos-symbols-internal):
* lisp/arc-mode.el (archive-arc-summarize)
(archive-zoo-summarize):
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-ext.el (math-read-big-expr)
(math-format-nice-expr, math-format-number-fancy):
* lisp/calc/calc-forms.el (math-read-angle-brackets):
* lisp/calc/calc-graph.el (calc-graph-set-range):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-lang.el (tex, latex, math-read-big-rec):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-user-define-permanent, math-define-exp):
* lisp/calc/calc.el (calc-record, calcDigit-key)
(calc-count-lines):
* lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots)
(math-do-integral):
* lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum)
(calc-get-fit-variables):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/java.el (semantic-java-expand-tag):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/cedet/semantic/wisent/python.el
(semantic-python-instance-variable-p):
* lisp/cus-edit.el (get):
* lisp/descr-text.el (describe-text-sexp):
* lisp/dired-aux.el (dired-compress-file):
* lisp/dired-x.el (dired-make-relative-symlink):
* lisp/dired.el (dired-glob-regexp):
* lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list):
* lisp/emacs-lisp/warnings.el (display-warning):
* lisp/emulation/viper-ex.el (viper-ex-read-file-name)
(ex-print-display-lines):
* lisp/env.el (read-envvar-name, setenv):
* lisp/epa-mail.el (epa-mail-encrypt):
* lisp/epg.el (epg--start):
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input):
* lisp/eshell/em-glob.el (eshell-glob-entries):
* lisp/eshell/esh-proc.el (eshell-needs-pipe-p):
* lisp/eshell/esh-util.el (eshell-convert):
* lisp/eshell/esh-var.el (eshell-envvar-names):
* lisp/faces.el (x-resolve-font-name):
* lisp/ffap.el (ffap-file-at-point):
* lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern):
* lisp/forms.el (forms--update):
* lisp/frameset.el (frameset-filter-unshelve-param):
* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc)
(gnus-inews-insert-gcc):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output)
(gnus-search--complete-key-data):
* lisp/gnus/gnus-spec.el (gnus-parse-simple-format):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-extract-address-components)
(gnus-newsgroup-directory-form):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-view):
* lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name):
* lisp/gnus/message.el (message-check-news-header-syntax)
(message-make-message-id, message-user-mail-address)
(message-make-fqdn, message-get-reply-headers, message-followup):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nnheader.el (nnheader-insert):
* lisp/gnus/nnimap.el (nnimap-process-quirk)
(nnimap-imap-ranges-to-gnus-ranges):
* lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix):
* lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path):
* lisp/gnus/nnrss.el (nnrss-match-macro):
* lisp/gnus/nntp.el (nntp-find-group-and-number):
* lisp/help-fns.el (help--symbol-completion-table-affixation):
* lisp/help.el (help-function-arglist):
* lisp/hippie-exp.el (he-concat-directory-file-name):
* lisp/htmlfontify.el (hfy-relstub):
* lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word)
(ido-exhibit):
* lisp/image/image-converter.el (image-convert-p):
* lisp/info-xref.el (info-xref-docstrings):
* lisp/info.el (Info-toc-build, Info-follow-reference)
(Info-backward-node, Info-finder-find-node)
(Info-speedbar-expand-node):
* lisp/international/mule-diag.el (print-fontset-element):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/linum.el (linum-after-change):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rmailkwd.el (rmail-set-label):
* lisp/mail/rmailsum.el (rmail-header-summary):
* lisp/mail/smtpmail.el (smtpmail-maybe-append-domain)
(smtpmail-user-mail-address):
* lisp/mail/uce.el (uce-reply-to-uce):
* lisp/man.el (Man-default-man-entry):
* lisp/mh-e/mh-alias.el (mh-alias-gecos-name)
(mh-alias-minibuffer-confirm-address):
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject):
* lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output):
* lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter)
(mh-folder-completion-function):
* lisp/minibuffer.el (completion--make-envvar-table)
(completion-file-name-table, completion-flex-try-completion)
(completion-flex-all-completions):
* lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p)
(mpc-constraints-tag-lookup):
* lisp/net/ange-ftp.el (ange-ftp-send-cmd)
(ange-ftp-allow-child-lookup):
* lisp/net/mailcap.el (mailcap-mime-types):
* lisp/net/mairix.el (mairix-search-thread-this-article):
* lisp/net/pop3.el (pop3-open-server):
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
* lisp/net/socks.el (socks-filter):
* lisp/nxml/nxml-outln.el (nxml-highlighted-qname):
* lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/obsolete/complete.el (partial-completion-mode)
(PC-do-completion):
* lisp/obsolete/longlines.el (longlines-encode-string):
* lisp/obsolete/nnir.el (nnir-compose-result):
* lisp/obsolete/terminal.el (te-quote-arg-for-sh):
* lisp/obsolete/tpu-edt.el (tpu-check-search-case):
* lisp/obsolete/url-ns.el (isPlainHostName):
* lisp/pcmpl-unix.el (pcomplete/scp):
* lisp/play/dunnet.el (dun-listify-string2, dun-get-path)
(dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface):
* lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment):
* lisp/progmodes/gdb-mi.el (gdb-var-delete)
(gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result):
* lisp/progmodes/gud.el (gud-find-expr):
* lisp/progmodes/idlw-help.el (idlwave-do-context-help1):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-filter-hidden-output, idlwave-shell-filter):
* lisp/progmodes/idlwave.el (idlwave-skip-label-or-case)
(idlwave-routine-info):
* lisp/progmodes/octave.el (inferior-octave-completion-at-point):
* lisp/progmodes/sh-script.el (sh-add-completer):
* lisp/progmodes/sql.el (defun):
* lisp/progmodes/xscheme.el (xscheme-process-filter):
* lisp/replace.el (query-replace-compile-replacement)
(map-query-replace-regexp):
* lisp/shell.el (shell--command-completion-data)
(shell-environment-variable-completion):
* lisp/simple.el (display-message-or-buffer):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/subr.el (split-string-and-unquote):
* lisp/tar-mode.el (tar-extract):
* lisp/term.el (term-command-hook, serial-read-name):
* lisp/textmodes/bibtex.el (bibtex-print-help-message):
* lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter)
(ispell-parse-output, ispell-buffer-local-parsing):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-parse.el (reftex-notice-new):
* lisp/textmodes/reftex-ref.el (reftex-show-entry):
* lisp/textmodes/reftex.el (reftex-compile-variables):
* lisp/textmodes/tex-mode.el (tex-send-command)
(tex-start-tex, tex-append):
* lisp/thingatpt.el (thing-at-point-url-at-point):
* lisp/tmm.el (tmm-add-one-shortcut):
* lisp/transient.el (transient-format-key):
* lisp/url/url-auth.el (url-basic-auth)
(url-digest-auth-directory-id-assoc):
* lisp/url/url-news.el (url-news):
* lisp/url/url-util.el (url-parse-query-string):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/wid-browse.el (widget-browse-sexp):
* lisp/woman.el (woman-parse-colon-path, woman-mini-help)
(WoMan-getpage-in-background, woman-negative-vertical-space):
* lisp/xml.el:
* test/lisp/emacs-lisp/check-declare-tests.el
(check-declare-tests-warn):
* test/lisp/files-tests.el
(files-tests-file-name-non-special-dired-compress-handler):
* test/lisp/net/network-stream-tests.el (server-process-filter):
* test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode):
Use `string-search` instead of `string-match` and `string-match-p`.
2021-08-09 11:20:00 +02:00
|
|
|
|
(while (setq pos (string-search "\n" s pos))
|
(calc-bug-address, calc-scan-for-dels, calc-stack)
(calc-stack-top, calc-always-load-extensions)
(calc-line-numbering, calc-line-breaking, calc-display-just)
(calc-display-origin, calc-number-radix, calc-leading-zeros)
(calc-group-digits, calc-group-char, calc-point-char)
(calc-frac-format, calc-prefer-frac, calc-hms-format)
(calc-date-format, calc-float-format, calc-complex-format)
(calc-full-float-format, calc-complex-mode, calc-infinite-mode)
(calc-display-strings, calc-matrix-just, calc-break-vectors)
(calc-full-vectors, calc-full-trail-vectors, calc-vector-commas)
(calc-vector-brackets, calc-matrix-brackets, calc-language)
(calc-language-option, calc-function-open, calc-function-open)
(calc-function-close, calc-language-output-filter)
(calc-language-input-filter, calc-radix-formatter)
(calc-left-label, calc-right-label, calc-word-size)
(calc-previous-modulo, calc-simplify-mode, calc-auto-recompute)
(calc-display-raw, calc-internal-prec, calc-inverse-flag)
(calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode)
(calc-algebraic-mode, calc-incomplete-algebraic-mode)
(calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix)
(calc-window-height, calc-display-trail, calc-show-selections)
(calc-use-selections, calc-assoc-selections)
(calc-display-working-message, calc-auto-why, calc-timing)
(calc-display-sci-high, calc-display-sci-low, calc-other-modes)
(calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file):
Make into real defvars.
(calc-mode-var-list): Delete.
(calc-mode-save-mode, calc-standard-date-formats)
(calc-autorange-units, calc-was-keypad-mode, calc-full-mode)
(calc-user-parse-tables, calc-gnuplot-default-device)
(calc-gnuplot-default-output, calc-gnuplot-print-device)
(calc-gnuplot-print-output, calc-gnuplot-geometry)
(calc-graph-default-resolution, calc-graph-default-resolution-3d)
(calc-invocation-macro, calc-show-banner): Make into defvars,
taken from `calc-mode-var-list'.
(calc-emacs-type-epoch, calc-emacs-type-19)
(calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars.
(calc-version, calc-version-date, calc-trail-pointer)
(calc-trail-overlay, calc-undo-list, calc-redo-list)
(calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why)
(calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag)
(calc-last-kill, calc-previous-alg-entry, calc-dollar-values)
(calc-dollar-used, calc-hashes-used, calc-quick-prev-results)
(calc-said-hello, calc-executing-macro, calc-any-selections)
(calc-help-phase, calc-full-help-flag, calc-refresh-count)
(calc-display-dirty, calc-prepared-composition)
(calc-selection-cache-default-entry, calc-embedded-info)
(calc-embedded-active, calc-standalone-flag, var-EvalRules)
(math-eval-rules-cache-tag, math-radix-explicit-format)
(math-expr-function-mapping, math-expr-variable-mapping)
(math-read-expr-quotes, math-working-step, math-working-step-2)
(var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into
defvars, from toplevel setq.
(calc-mode-map): Set up keymap in more modern fashion.
(calc-dispatch-map): Ditto.
(calc-command-flags, calc-final-point-line)
(calc-final-point-column): Defvar.
(calc-do): Use `save-current-buffer' instead of `save-excursion'.
(sel-mode): Defvar.
(calc-any-evaltos): Ditto.
(calc-buffer, calc-prev-char, calc-prev-prev-char)
(calc-digit-value): Ditto.
(math-eval-rules-cache, math-eval-rules-cache-other): Ditto.
(math-sub-bignum): Bind `diff'.
(calc-selection-cache-entry): Defvar.
(calc-count-lines): Reference `pos' instead of `newpos'.
2002-09-27 04:55:22 +00:00
|
|
|
|
(setq pos (1+ pos)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
num (1+ num)))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
num))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-format-value (a &optional w)
|
|
|
|
|
(if (and (Math-scalarp a)
|
|
|
|
|
(memq calc-language '(nil flat unform)))
|
|
|
|
|
(math-format-number a)
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((calc-line-breaking nil))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-composition-to-string (math-compose-expr a 0) w))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-window-width ()
|
|
|
|
|
(if calc-embedded-info
|
|
|
|
|
(let ((win (get-buffer-window (aref calc-embedded-info 0))))
|
2001-11-13 07:34:05 +00:00
|
|
|
|
(1- (if win (window-width win) (frame-width))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(- (window-width (get-buffer-window (current-buffer)))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(if calc-line-numbering 5 1))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-comp-concat (c1 c2)
|
|
|
|
|
(if (and (stringp c1) (stringp c2))
|
|
|
|
|
(concat c1 c2)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(list 'horiz c1 c2)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Format an expression as a one-line string suitable for re-reading.
|
|
|
|
|
|
|
|
|
|
(defun math-format-flat-expr (a prec)
|
|
|
|
|
(cond
|
|
|
|
|
((or (not (or (consp a) (integerp a)))
|
|
|
|
|
(eq calc-display-raw t))
|
|
|
|
|
(let ((print-escape-newlines t))
|
|
|
|
|
(concat "'" (prin1-to-string a))))
|
|
|
|
|
((Math-scalarp a)
|
|
|
|
|
(let ((calc-group-digits nil)
|
|
|
|
|
(calc-point-char ".")
|
|
|
|
|
(calc-frac-format (if (> (length (car calc-frac-format)) 1)
|
|
|
|
|
'("::" nil) '(":" nil)))
|
|
|
|
|
(calc-complex-format nil)
|
|
|
|
|
(calc-hms-format "%s@ %s' %s\"")
|
|
|
|
|
(calc-language nil))
|
|
|
|
|
(math-format-number a)))
|
|
|
|
|
(t
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-format-flat-expr-fancy a prec))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Format a number as a string.
|
2009-11-15 23:55:53 +00:00
|
|
|
|
(defvar math-half-2-word-size)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-format-number (a &optional prec) ; [X N] [Public]
|
|
|
|
|
(cond
|
|
|
|
|
((eq calc-display-raw t) (format "%s" a))
|
2009-11-20 00:54:19 +00:00
|
|
|
|
((and calc-twos-complement-mode
|
2009-11-15 23:55:53 +00:00
|
|
|
|
math-radix-explicit-format
|
|
|
|
|
(Math-integerp a)
|
|
|
|
|
(or (eq a 0)
|
|
|
|
|
(and (Math-integer-posp a)
|
|
|
|
|
(Math-lessp a math-half-2-word-size))
|
|
|
|
|
(and (Math-integer-negp a)
|
|
|
|
|
(require 'calc-ext)
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(let ((comparison
|
2009-11-15 23:55:53 +00:00
|
|
|
|
(math-compare (Math-integer-neg a) math-half-2-word-size)))
|
|
|
|
|
(or (= comparison 0)
|
|
|
|
|
(= comparison -1))))))
|
|
|
|
|
(require 'calc-bin)
|
2009-11-20 00:54:19 +00:00
|
|
|
|
(math-format-twos-complement a))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((and (nth 1 calc-frac-format) (Math-integerp a))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-format-number (math-adjust-fraction a)))
|
|
|
|
|
((integerp a)
|
|
|
|
|
(if (not (or calc-group-digits calc-leading-zeros))
|
|
|
|
|
(if (= calc-number-radix 10)
|
|
|
|
|
(int-to-string a)
|
|
|
|
|
(if (< a 0)
|
|
|
|
|
(concat "-" (math-format-number (- a)))
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if math-radix-explicit-format
|
|
|
|
|
(if calc-radix-formatter
|
|
|
|
|
(funcall calc-radix-formatter
|
|
|
|
|
calc-number-radix
|
|
|
|
|
(if (= calc-number-radix 2)
|
|
|
|
|
(math-format-binary a)
|
|
|
|
|
(math-format-radix a)))
|
|
|
|
|
(format "%d#%s" calc-number-radix
|
|
|
|
|
(if (= calc-number-radix 2)
|
|
|
|
|
(math-format-binary a)
|
|
|
|
|
(math-format-radix a))))
|
|
|
|
|
(math-format-radix a))))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(require 'calc-ext)
|
|
|
|
|
(declare-function math--format-integer-fancy "calc-ext" (a))
|
|
|
|
|
(concat (if (< a 0) "-") (math--format-integer-fancy (abs a)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((stringp a) a)
|
|
|
|
|
((not (consp a)) (prin1-to-string a))
|
|
|
|
|
((and (eq (car a) 'float) (= calc-number-radix 10))
|
|
|
|
|
(if (Math-integer-negp (nth 1 a))
|
|
|
|
|
(concat "-" (math-format-number (math-neg a)))
|
|
|
|
|
(let ((mant (nth 1 a))
|
|
|
|
|
(exp (nth 2 a))
|
|
|
|
|
(fmt (car calc-float-format))
|
|
|
|
|
(figs (nth 1 calc-float-format))
|
|
|
|
|
(point calc-point-char)
|
|
|
|
|
str)
|
|
|
|
|
(if (and (eq fmt 'fix)
|
|
|
|
|
(or (and (< figs 0) (setq figs (- figs)))
|
|
|
|
|
(> (+ exp (math-numdigs mant)) (- figs))))
|
|
|
|
|
(progn
|
|
|
|
|
(setq mant (math-scale-rounding mant (+ exp figs))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
str (int-to-string mant))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (<= (length str) figs)
|
|
|
|
|
(setq str (concat (make-string (1+ (- figs (length str))) ?0)
|
|
|
|
|
str)))
|
|
|
|
|
(if (> figs 0)
|
|
|
|
|
(setq str (concat (substring str 0 (- figs)) point
|
|
|
|
|
(substring str (- figs))))
|
|
|
|
|
(setq str (concat str point)))
|
2002-04-14 05:50:05 +00:00
|
|
|
|
(when calc-group-digits
|
|
|
|
|
(require 'calc-ext)
|
|
|
|
|
(setq str (math-group-float str))))
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when (< figs 0)
|
|
|
|
|
(setq figs (+ calc-internal-prec figs)))
|
|
|
|
|
(when (> figs 0)
|
|
|
|
|
(let ((adj (- figs (math-numdigs mant))))
|
|
|
|
|
(when (< adj 0)
|
|
|
|
|
(setq mant (math-scale-rounding mant adj)
|
|
|
|
|
exp (- exp adj)))))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(setq str (int-to-string mant))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let* ((len (length str))
|
2021-04-27 17:36:15 +02:00
|
|
|
|
(dpos (+ exp len))
|
|
|
|
|
(trailing-0 (and calc-digit-after-point "0")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (and (eq fmt 'float)
|
|
|
|
|
(<= dpos (+ calc-internal-prec calc-display-sci-high))
|
|
|
|
|
(>= dpos (+ calc-display-sci-low 2)))
|
|
|
|
|
(progn
|
|
|
|
|
(cond
|
|
|
|
|
((= dpos 0)
|
|
|
|
|
(setq str (concat "0" point str)))
|
|
|
|
|
((and (<= exp 0) (> dpos 0))
|
|
|
|
|
(setq str (concat (substring str 0 dpos) point
|
2021-04-27 17:36:15 +02:00
|
|
|
|
(substring str dpos)
|
|
|
|
|
(and (>= dpos len) trailing-0))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((> exp 0)
|
2021-04-27 17:36:15 +02:00
|
|
|
|
(setq str (concat str (make-string exp ?0)
|
|
|
|
|
point trailing-0)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(t ; (< dpos 0)
|
|
|
|
|
(setq str (concat "0" point
|
|
|
|
|
(make-string (- dpos) ?0) str))))
|
2002-04-14 05:50:05 +00:00
|
|
|
|
(when calc-group-digits
|
|
|
|
|
(require 'calc-ext)
|
|
|
|
|
(setq str (math-group-float str))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let* ((eadj (+ exp len))
|
|
|
|
|
(scale (if (eq fmt 'eng)
|
|
|
|
|
(1+ (math-mod (+ eadj 300002) 3))
|
|
|
|
|
1)))
|
|
|
|
|
(if (> scale (length str))
|
|
|
|
|
(setq str (concat str (make-string (- scale (length str))
|
|
|
|
|
?0))))
|
|
|
|
|
(if (< scale (length str))
|
|
|
|
|
(setq str (concat (substring str 0 scale) point
|
|
|
|
|
(substring str scale))))
|
2002-04-14 05:50:05 +00:00
|
|
|
|
(when calc-group-digits
|
|
|
|
|
(require 'calc-ext)
|
|
|
|
|
(setq str (math-group-float str)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq str (format (if (memq calc-language '(math maple))
|
|
|
|
|
(if (and prec (> prec 191))
|
|
|
|
|
"(%s*10.^%d)" "%s*10.^%d")
|
|
|
|
|
"%se%d")
|
|
|
|
|
str (- eadj scale)))))))
|
|
|
|
|
str)))
|
|
|
|
|
(t
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-format-number-fancy a prec))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Parse a simple number in string form. [N X] [Public]
|
2008-08-05 03:38:24 +00:00
|
|
|
|
(defun math-read-number (s &optional decimal)
|
2007-07-07 04:15:40 +00:00
|
|
|
|
"Convert the string S into a Calc number."
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-normalize
|
2009-10-23 01:40:13 +00:00
|
|
|
|
(save-match-data
|
|
|
|
|
(cond
|
2010-06-22 00:41:10 -07:00
|
|
|
|
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Integers (most common case)
|
|
|
|
|
((string-match "\\` *\\([0-9]+\\) *\\'" s)
|
|
|
|
|
(let ((digs (math-match-substring s 1)))
|
|
|
|
|
(if (and (memq calc-language calc-lang-c-type-hex)
|
|
|
|
|
(> (length digs) 1)
|
|
|
|
|
(eq (aref digs 0) ?0)
|
|
|
|
|
(null decimal))
|
|
|
|
|
(math-read-number (concat "8#" digs))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(string-to-number digs))))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Clean up the string if necessary
|
|
|
|
|
((string-match "\\`\\(.*\\)[ \t\n]+\\([^\001]*\\)\\'" s)
|
|
|
|
|
(math-read-number (concat (math-match-substring s 1)
|
|
|
|
|
(math-match-substring s 2))))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Plus and minus signs
|
|
|
|
|
((string-match "^[-_+]\\(.*\\)$" s)
|
|
|
|
|
(let ((val (math-read-number (math-match-substring s 1))))
|
|
|
|
|
(and val (if (eq (aref s 0) ?+) val (math-neg val)))))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Forms that require extensions module
|
|
|
|
|
((string-match "[^-+0-9eE.]" s)
|
|
|
|
|
(require 'calc-ext)
|
|
|
|
|
(math-read-number-fancy s))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Decimal point
|
|
|
|
|
((string-match "^\\([0-9]*\\)\\.\\([0-9]*\\)$" s)
|
|
|
|
|
(let ((int (math-match-substring s 1))
|
|
|
|
|
(frac (math-match-substring s 2)))
|
|
|
|
|
(let ((ilen (length int))
|
|
|
|
|
(flen (length frac)))
|
|
|
|
|
(let ((int (if (> ilen 0) (math-read-number int t) 0))
|
|
|
|
|
(frac (if (> flen 0) (math-read-number frac t) 0)))
|
|
|
|
|
(and int frac (or (> ilen 0) (> flen 0))
|
|
|
|
|
(list 'float
|
|
|
|
|
(math-add (math-scale-int int flen) frac)
|
|
|
|
|
(- flen)))))))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; "e" notation
|
|
|
|
|
((string-match "^\\(.*\\)[eE]\\([-+]?[0-9]+\\)$" s)
|
|
|
|
|
(let ((mant (math-match-substring s 1))
|
|
|
|
|
(exp (math-match-substring s 2)))
|
|
|
|
|
(let ((mant (if (> (length mant) 0) (math-read-number mant t) 1))
|
|
|
|
|
(exp (if (<= (length exp) (if (memq (aref exp 0) '(?+ ?-)) 8 7))
|
|
|
|
|
(string-to-number exp))))
|
|
|
|
|
(and mant exp (Math-realp mant) (> exp -4000000) (< exp 4000000)
|
|
|
|
|
(let ((mant (math-float mant)))
|
|
|
|
|
(list 'float (nth 1 mant) (+ (nth 2 mant) exp)))))))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Syntax error!
|
|
|
|
|
(t nil)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2007-06-22 01:05:10 +00:00
|
|
|
|
;;; Parse a very simple number, keeping all digits.
|
|
|
|
|
(defun math-read-number-simple (s)
|
2007-07-07 04:15:40 +00:00
|
|
|
|
"Convert the string S into a Calc number.
|
|
|
|
|
S is assumed to be a simple number (integer or float without an exponent)
|
|
|
|
|
and all digits are kept, regardless of Calc's current precision."
|
2009-10-23 01:40:13 +00:00
|
|
|
|
(save-match-data
|
|
|
|
|
(cond
|
|
|
|
|
;; Integer
|
|
|
|
|
((string-match "^[0-9]+$" s)
|
|
|
|
|
(if (string-match "^\\(0+\\)" s)
|
|
|
|
|
(setq s (substring s (match-end 0))))
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(string-to-number s))
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Minus sign
|
|
|
|
|
((string-match "^-[0-9]+$" s)
|
* lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.
(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.
* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.
* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.
* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.
* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp. Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.
* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.
* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.
* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.
* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
|
|
|
|
(string-to-number s))
|
2009-10-23 01:40:13 +00:00
|
|
|
|
;; Decimal point
|
|
|
|
|
((string-match "^\\(-?[0-9]*\\)\\.\\([0-9]*\\)$" s)
|
|
|
|
|
(let ((int (math-match-substring s 1))
|
|
|
|
|
(frac (math-match-substring s 2)))
|
|
|
|
|
(list 'float (math-read-number-simple (concat int frac))
|
|
|
|
|
(- (length frac)))))
|
|
|
|
|
;; Syntax error!
|
|
|
|
|
(t nil))))
|
2007-06-22 01:05:10 +00:00
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-match-substring (s n)
|
|
|
|
|
(if (match-beginning n)
|
|
|
|
|
(substring s (match-beginning n) (match-end n))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
""))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defconst math-standard-opers
|
|
|
|
|
'( ( "_" calcFunc-subscr 1200 1201 )
|
|
|
|
|
( "%" calcFunc-percent 1100 -1 )
|
|
|
|
|
( "u!" calcFunc-lnot -1 1000 )
|
|
|
|
|
( "mod" mod 400 400 185 )
|
|
|
|
|
( "+/-" sdev 300 300 185 )
|
|
|
|
|
( "!!" calcFunc-dfact 210 -1 )
|
|
|
|
|
( "!" calcFunc-fact 210 -1 )
|
|
|
|
|
( "^" ^ 201 200 )
|
|
|
|
|
( "**" ^ 201 200 )
|
2007-10-27 20:24:52 +00:00
|
|
|
|
( "u+" ident -1 197 )
|
|
|
|
|
( "u-" neg -1 197 )
|
2001-11-06 18:59:06 +00:00
|
|
|
|
( "/" / 190 191 )
|
|
|
|
|
( "%" % 190 191 )
|
|
|
|
|
( "\\" calcFunc-idiv 190 191 )
|
|
|
|
|
( "+" + 180 181 )
|
|
|
|
|
( "-" - 180 181 )
|
|
|
|
|
( "|" | 170 171 )
|
|
|
|
|
( "<" calcFunc-lt 160 161 )
|
|
|
|
|
( ">" calcFunc-gt 160 161 )
|
|
|
|
|
( "<=" calcFunc-leq 160 161 )
|
|
|
|
|
( ">=" calcFunc-geq 160 161 )
|
|
|
|
|
( "=" calcFunc-eq 160 161 )
|
|
|
|
|
( "==" calcFunc-eq 160 161 )
|
|
|
|
|
( "!=" calcFunc-neq 160 161 )
|
|
|
|
|
( "&&" calcFunc-land 110 111 )
|
|
|
|
|
( "||" calcFunc-lor 100 101 )
|
|
|
|
|
( "?" (math-read-if) 91 90 )
|
|
|
|
|
( "!!!" calcFunc-pnot -1 85 )
|
|
|
|
|
( "&&&" calcFunc-pand 80 81 )
|
|
|
|
|
( "|||" calcFunc-por 75 76 )
|
|
|
|
|
( ":=" calcFunc-assign 51 50 )
|
|
|
|
|
( "::" calcFunc-condition 45 46 )
|
|
|
|
|
( "=>" calcFunc-evalto 40 41 )
|
2001-11-19 07:43:05 +00:00
|
|
|
|
( "=>" calcFunc-evalto 40 -1 )))
|
2007-06-20 04:07:24 +00:00
|
|
|
|
|
|
|
|
|
(defun math-standard-ops ()
|
|
|
|
|
(if calc-multiplication-has-precedence
|
|
|
|
|
(cons
|
|
|
|
|
'( "*" * 196 195 )
|
|
|
|
|
(cons
|
|
|
|
|
'( "2x" * 196 195 )
|
|
|
|
|
math-standard-opers))
|
|
|
|
|
(cons
|
2007-06-20 19:32:49 +00:00
|
|
|
|
'( "*" * 190 191 )
|
2007-06-20 04:07:24 +00:00
|
|
|
|
(cons
|
2007-06-20 19:32:49 +00:00
|
|
|
|
'( "2x" * 190 191 )
|
2007-06-20 04:07:24 +00:00
|
|
|
|
math-standard-opers))))
|
|
|
|
|
|
2007-07-08 00:11:09 +00:00
|
|
|
|
(defvar math-expr-opers (math-standard-ops))
|
|
|
|
|
|
2007-06-20 04:07:24 +00:00
|
|
|
|
(defun math-standard-ops-p ()
|
|
|
|
|
(let ((meo (caar math-expr-opers)))
|
|
|
|
|
(and (stringp meo)
|
|
|
|
|
(string= meo "*"))))
|
|
|
|
|
|
|
|
|
|
(defun math-expr-ops ()
|
|
|
|
|
(if (math-standard-ops-p)
|
|
|
|
|
(math-standard-ops)
|
|
|
|
|
math-expr-opers))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun calc-grab-region (top bot arg)
|
|
|
|
|
"Parse the region as a vector of numbers and push it on the Calculator stack."
|
|
|
|
|
(interactive "r\nP")
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2021-09-06 12:56:02 +02:00
|
|
|
|
(if rectangle-mark-mode
|
|
|
|
|
(calc-do-grab-rectangle top bot arg)
|
|
|
|
|
(calc-do-grab-region top bot arg)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun calc-grab-rectangle (top bot arg)
|
|
|
|
|
"Parse a rectangle as a matrix of numbers and push it on the Calculator stack."
|
|
|
|
|
(interactive "r\nP")
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-do-grab-rectangle top bot arg))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2021-09-01 10:14:33 +02:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-grab-sum-down (top bot arg)
|
|
|
|
|
"Parse a rectangle as a matrix of numbers and sum its columns."
|
|
|
|
|
(interactive "r\nP")
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-do-grab-rectangle top bot arg 'calcFunc-reduced))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2021-09-01 10:14:33 +02:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-grab-sum-across (top bot arg)
|
|
|
|
|
"Parse a rectangle as a matrix of numbers and sum its rows."
|
|
|
|
|
(interactive "r\nP")
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-do-grab-rectangle top bot arg 'calcFunc-reducea))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun calc-embedded (arg &optional end obeg oend)
|
|
|
|
|
"Start Calc Embedded mode on the formula surrounding point."
|
|
|
|
|
(interactive "P")
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-do-embedded arg end obeg oend))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun calc-embedded-activate (&optional arg cbuf)
|
|
|
|
|
"Scan the current editing buffer for all embedded := and => formulas.
|
|
|
|
|
Also looks for the equivalent TeX words, \\gets and \\evalto."
|
|
|
|
|
(interactive "P")
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(calc-do-embedded-activate arg cbuf))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-user-invocation ()
|
|
|
|
|
(interactive)
|
2005-05-30 02:49:54 +00:00
|
|
|
|
(unless calc-invocation-macro
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 08:41:44 -07:00
|
|
|
|
(error "Use `Z I' inside Calc to define a `C-x * Z' keyboard macro"))
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(execute-kbd-macro calc-invocation-macro nil))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;;; User-programmability.
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defmacro defmath (func args &rest body) ; [Public]
|
2008-06-28 14:19:02 +00:00
|
|
|
|
"Define Calc function.
|
|
|
|
|
|
|
|
|
|
Like `defun' except that code in the body of the definition can
|
|
|
|
|
make use of the full range of Calc data types and the usual
|
|
|
|
|
arithmetic operations are converted to their Calc equivalents.
|
|
|
|
|
|
|
|
|
|
The prefix `calcFunc-' is added to the specified name to get the
|
|
|
|
|
actual Lisp function name.
|
|
|
|
|
|
|
|
|
|
See Info node `(calc)Defining Functions'."
|
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
2018-11-20 16:09:35 -05:00
|
|
|
|
(declare (doc-string 3)) ;; FIXME: Edebug spec?
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-14 09:09:09 +00:00
|
|
|
|
(math-do-defmath func args body))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2019-06-19 22:56:26 +02:00
|
|
|
|
(defun calc-read-key (&optional _optkey)
|
|
|
|
|
(declare (obsolete read-event "27.1"))
|
|
|
|
|
(let ((key (read-event)))
|
|
|
|
|
(cons key key)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-unread-command (&optional input)
|
2019-10-15 15:09:55 +03:00
|
|
|
|
(let ((event (or input last-command-event)))
|
|
|
|
|
;; Avoid recording twice the keys pressed while defining a
|
|
|
|
|
;; keyboard macro.
|
|
|
|
|
(when defining-kbd-macro
|
|
|
|
|
(setq event (cons 'no-record event)))
|
|
|
|
|
(push event unread-command-events)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calc-clear-unread-commands ()
|
2019-06-19 22:56:26 +02:00
|
|
|
|
(setq unread-command-events nil))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2020-09-11 13:02:59 +02:00
|
|
|
|
(defcalcmodevar math-2-word-size 4294967296
|
2009-11-15 23:55:53 +00:00
|
|
|
|
"Two to the power of `calc-word-size'.")
|
|
|
|
|
|
2020-09-11 13:02:59 +02:00
|
|
|
|
(defcalcmodevar math-half-2-word-size 2147483648
|
2009-11-15 23:55:53 +00:00
|
|
|
|
"One-half of two to the power of `calc-word-size'.")
|
|
|
|
|
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(when calc-always-load-extensions
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(require 'calc-ext)
|
2002-06-12 05:11:22 +00:00
|
|
|
|
(calc-load-everything))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(run-hooks 'calc-load-hook)
|
|
|
|
|
|
Move require to end of file.
(calc-info-filename, calc-autoload-directory, calc-extensions-loaded):
Remove unnecessary variable.
(calc-do-dispatch, calc-mode, calc-check-defines, calc-create-buffer)
(calc, calc-keypad, full-calc-keypad, calc-do, calc-normalize)
(calc-binary-op, calc-unary-op, calcDigit-start, calcDigit-key)
(math-normalize, math-add, math-mul, math-div,
(math-format-stack-value, math-stack-value-offset, math-format-value)
(math-format-flat-expr, math-format-number, math-format-bignum)
(math-read-number, calc-grab-region, calc-grab-rectangle)
(calc-grab-sum-down, calc-grab-sum-across, calc-embedded, defmath)
(calc-check-defines): Replace calc-need-macros by appropriate require.
2004-11-29 06:00:07 +00:00
|
|
|
|
(provide 'calc)
|
|
|
|
|
|
2001-11-14 09:09:09 +00:00
|
|
|
|
;;; calc.el ends here
|