2020-10-10 16:00:51 -04:00
|
|
|
|
;;; calc-aent.el --- algebraic entry functions for Calc -*- lexical-binding:t -*-
|
2001-11-19 07:44:56 +00:00
|
|
|
|
|
2021-01-01 01:13:56 -08:00
|
|
|
|
;; Copyright (C) 1990-1993, 2001-2021 Free Software Foundation, Inc.
|
2001-11-19 07:44:56 +00:00
|
|
|
|
|
|
|
|
|
;; Author: Dave Gillespie <daveg@synaptics.com>
|
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:44:56 +00:00
|
|
|
|
;;; Commentary:
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2001-11-19 07:44:56 +00:00
|
|
|
|
;;; Code:
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
;; This file is autoloaded from calc.el.
|
|
|
|
|
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(require 'calc-macs)
|
|
|
|
|
|
(calc-refresh-evaltos, calc-execute-kbd-macro)
(math-is-true, calc-explain-why, calc-alg-edit)
(math-composite-inequalities, math-flatten-lands)
(math-multi-subst, calcFunc-vmatches, math-simplify)
(math-known-matrixp, math-parse-fortran-subscr, math-to-radians-2)
(math-read-string, math-read-brackets, math-read-angle-brackets):
Declare as functions.
2007-11-27 04:00:56 +00:00
|
|
|
|
;; Declare functions which are defined elsewhere.
|
2015-10-08 08:32:00 -05:00
|
|
|
|
(declare-function calc-digit-start-entry "calc" ())
|
(calc-refresh-evaltos, calc-execute-kbd-macro)
(math-is-true, calc-explain-why, calc-alg-edit)
(math-composite-inequalities, math-flatten-lands)
(math-multi-subst, calcFunc-vmatches, math-simplify)
(math-known-matrixp, math-parse-fortran-subscr, math-to-radians-2)
(math-read-string, math-read-brackets, math-read-angle-brackets):
Declare as functions.
2007-11-27 04:00:56 +00:00
|
|
|
|
(declare-function calc-refresh-evaltos "calc-ext" (&optional which-var))
|
|
|
|
|
(declare-function calc-execute-kbd-macro "calc-prog" (mac arg &rest prefix))
|
|
|
|
|
(declare-function math-is-true "calc-ext" (expr))
|
|
|
|
|
(declare-function calc-explain-why "calc-stuff" (why &optional more))
|
|
|
|
|
(declare-function calc-alg-edit "calc-yank" (str))
|
|
|
|
|
(declare-function math-composite-inequalities "calc-prog" (x op))
|
|
|
|
|
(declare-function math-flatten-lands "calc-rewr" (expr))
|
|
|
|
|
(declare-function math-multi-subst "calc-map" (expr olds news))
|
|
|
|
|
(declare-function calcFunc-vmatches "calc-rewr" (expr pat))
|
|
|
|
|
(declare-function math-simplify "calc-alg" (top-expr))
|
|
|
|
|
(declare-function math-known-matrixp "calc-arith" (a))
|
|
|
|
|
(declare-function math-parse-fortran-subscr "calc-lang" (sym args))
|
2013-05-10 19:27:28 -07:00
|
|
|
|
(declare-function math-to-radians-2 "calc-math" (a &optional force-symbolic))
|
(calc-refresh-evaltos, calc-execute-kbd-macro)
(math-is-true, calc-explain-why, calc-alg-edit)
(math-composite-inequalities, math-flatten-lands)
(math-multi-subst, calcFunc-vmatches, math-simplify)
(math-known-matrixp, math-parse-fortran-subscr, math-to-radians-2)
(math-read-string, math-read-brackets, math-read-angle-brackets):
Declare as functions.
2007-11-27 04:00:56 +00:00
|
|
|
|
(declare-function math-read-string "calc-ext" ())
|
|
|
|
|
(declare-function math-read-brackets "calc-vec" (space-sep math-rb-close))
|
|
|
|
|
(declare-function math-read-angle-brackets "calc-forms" ())
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(declare-function math-to-percentsigns "calccomp" (x))
|
(calc-refresh-evaltos, calc-execute-kbd-macro)
(math-is-true, calc-explain-why, calc-alg-edit)
(math-composite-inequalities, math-flatten-lands)
(math-multi-subst, calcFunc-vmatches, math-simplify)
(math-known-matrixp, math-parse-fortran-subscr, math-to-radians-2)
(math-read-string, math-read-brackets, math-read-angle-brackets):
Declare as functions.
2007-11-27 04:00:56 +00:00
|
|
|
|
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(defvar calc-quick-calc-history nil
|
|
|
|
|
"The history list for quick-calc.")
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2014-10-28 19:37:37 -05:00
|
|
|
|
(defun calc-do-quick-calc (&optional insert)
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-check-defines)
|
|
|
|
|
(if (eq major-mode 'calc-mode)
|
|
|
|
|
(calc-algebraic-entry t)
|
|
|
|
|
(let (buf shortbuf)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-create-buffer)
|
|
|
|
|
(let* ((calc-command-flags nil)
|
|
|
|
|
(calc-dollar-values calc-quick-prev-results)
|
|
|
|
|
(calc-dollar-used 0)
|
|
|
|
|
(enable-recursive-minibuffers t)
|
|
|
|
|
(calc-language (if (memq calc-language '(nil big))
|
|
|
|
|
'flat calc-language))
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(entry (calc-do-alg-entry "" "Quick calc: " t 'calc-quick-calc-history))
|
|
|
|
|
(alg-exp (mapcar 'math-evaluate-expr entry)))
|
2001-11-19 07:44:56 +00:00
|
|
|
|
(when (and (= (length alg-exp) 1)
|
|
|
|
|
(eq (car-safe (car alg-exp)) 'calcFunc-assign)
|
|
|
|
|
(= (length (car alg-exp)) 3)
|
|
|
|
|
(eq (car-safe (nth 1 (car alg-exp))) 'var))
|
|
|
|
|
(set (nth 2 (nth 1 (car alg-exp))) (nth 2 (car alg-exp)))
|
|
|
|
|
(calc-refresh-evaltos (nth 2 (nth 1 (car alg-exp))))
|
|
|
|
|
(setq alg-exp (list (nth 2 (car alg-exp)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq calc-quick-prev-results alg-exp
|
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
|
|
|
|
buf (mapconcat (lambda (x)
|
|
|
|
|
(math-format-value x 1000))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
alg-exp
|
|
|
|
|
" ")
|
|
|
|
|
shortbuf buf)
|
|
|
|
|
(if (and (= (length alg-exp) 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
|
|
|
|
(memq (car-safe (car alg-exp)) '(nil))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(< (length buf) 20)
|
|
|
|
|
(= calc-number-radix 10))
|
|
|
|
|
(setq buf (concat buf " ("
|
|
|
|
|
(let ((calc-number-radix 16))
|
|
|
|
|
(math-format-value (car alg-exp) 1000))
|
|
|
|
|
", "
|
|
|
|
|
(let ((calc-number-radix 8))
|
|
|
|
|
(math-format-value (car alg-exp) 1000))
|
2007-08-14 14:52:51 +00:00
|
|
|
|
", "
|
|
|
|
|
(let ((calc-number-radix 2))
|
|
|
|
|
(math-format-value (car alg-exp) 1000))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (and (integerp (car alg-exp))
|
|
|
|
|
(> (car alg-exp) 0)
|
|
|
|
|
(< (car alg-exp) 127))
|
|
|
|
|
(format ", \"%c\"" (car alg-exp))
|
|
|
|
|
"")
|
|
|
|
|
")")))
|
2001-11-11 10:26:44 +00:00
|
|
|
|
(if (and (< (length buf) (frame-width)) (= (length entry) 1)
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(featurep 'calc-ext))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((long (concat (math-format-value (car entry) 1000)
|
|
|
|
|
" => " buf)))
|
2001-11-11 10:26:44 +00:00
|
|
|
|
(if (<= (length long) (- (frame-width) 8))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq buf long))))
|
|
|
|
|
(calc-handle-whys)
|
|
|
|
|
(message "Result: %s" buf)))
|
2014-10-28 19:37:37 -05:00
|
|
|
|
(if (or insert
|
|
|
|
|
(eq last-command-event 10))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(insert shortbuf)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(kill-new shortbuf)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-do-calc-eval (str separator args)
|
|
|
|
|
(calc-check-defines)
|
|
|
|
|
(catch 'calc-error
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-create-buffer)
|
|
|
|
|
(cond
|
|
|
|
|
((and (consp str) (not (symbolp (car str))))
|
|
|
|
|
(let ((calc-language nil)
|
2007-06-20 04:12:15 +00:00
|
|
|
|
(math-expr-opers (math-standard-ops))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-internal-prec 12)
|
|
|
|
|
(calc-word-size 32)
|
|
|
|
|
(calc-symbolic-mode nil)
|
|
|
|
|
(calc-matrix-mode nil)
|
|
|
|
|
(calc-angle-mode 'deg)
|
|
|
|
|
(calc-number-radix 10)
|
2009-11-20 00:55:13 +00:00
|
|
|
|
(calc-twos-complement-mode nil)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-leading-zeros nil)
|
|
|
|
|
(calc-group-digits nil)
|
|
|
|
|
(calc-point-char ".")
|
|
|
|
|
(calc-frac-format '(":" nil))
|
|
|
|
|
(calc-prefer-frac nil)
|
|
|
|
|
(calc-hms-format "%s@ %s' %s\"")
|
|
|
|
|
(calc-date-format '((H ":" mm C SS pp " ")
|
|
|
|
|
Www " " Mmm " " D ", " YYYY))
|
|
|
|
|
(calc-float-format '(float 0))
|
|
|
|
|
(calc-full-float-format '(float 0))
|
|
|
|
|
(calc-complex-format nil)
|
|
|
|
|
(calc-matrix-just nil)
|
|
|
|
|
(calc-full-vectors t)
|
|
|
|
|
(calc-break-vectors nil)
|
|
|
|
|
(calc-vector-commas ",")
|
|
|
|
|
(calc-vector-brackets "[]")
|
|
|
|
|
(calc-matrix-brackets '(R O))
|
|
|
|
|
(calc-complex-mode 'cplx)
|
|
|
|
|
(calc-infinite-mode nil)
|
|
|
|
|
(calc-display-strings nil)
|
|
|
|
|
(calc-simplify-mode nil)
|
|
|
|
|
(calc-display-working-message 'lots)
|
|
|
|
|
(strp (cdr str)))
|
|
|
|
|
(while strp
|
|
|
|
|
(set (car strp) (nth 1 strp))
|
|
|
|
|
(setq strp (cdr (cdr strp))))
|
|
|
|
|
(calc-do-calc-eval (car str) separator args)))
|
|
|
|
|
((eq separator 'eval)
|
2020-10-10 16:00:51 -04:00
|
|
|
|
(eval str t))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((eq separator 'macro)
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let* ((calc-buffer (current-buffer))
|
|
|
|
|
(calc-window (get-buffer-window calc-buffer))
|
|
|
|
|
(save-window (selected-window)))
|
|
|
|
|
(if calc-window
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
|
|
|
|
(select-window calc-window)
|
|
|
|
|
(calc-execute-kbd-macro str nil (car args)))
|
|
|
|
|
(and (window-point save-window)
|
|
|
|
|
(select-window save-window)))
|
|
|
|
|
(save-window-excursion
|
|
|
|
|
(select-window (get-largest-window))
|
|
|
|
|
(switch-to-buffer calc-buffer)
|
|
|
|
|
(calc-execute-kbd-macro str nil (car args)))))
|
|
|
|
|
nil)
|
|
|
|
|
((eq separator 'pop)
|
|
|
|
|
(or (not (integerp str))
|
|
|
|
|
(= str 0)
|
|
|
|
|
(calc-pop (min str (calc-stack-size))))
|
|
|
|
|
(calc-stack-size))
|
|
|
|
|
((eq separator 'top)
|
|
|
|
|
(and (integerp str)
|
|
|
|
|
(> str 0)
|
|
|
|
|
(<= str (calc-stack-size))
|
|
|
|
|
(math-format-value (calc-top-n str (car args)) 1000)))
|
|
|
|
|
((eq separator 'rawtop)
|
|
|
|
|
(and (integerp str)
|
|
|
|
|
(> str 0)
|
|
|
|
|
(<= str (calc-stack-size))
|
|
|
|
|
(calc-top-n str (car args))))
|
|
|
|
|
(t
|
|
|
|
|
(let* ((calc-command-flags nil)
|
|
|
|
|
(calc-next-why nil)
|
|
|
|
|
(calc-language (if (memq calc-language '(nil big))
|
|
|
|
|
'flat calc-language))
|
|
|
|
|
(calc-dollar-values (mapcar
|
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
|
|
|
|
(lambda (x)
|
|
|
|
|
(if (stringp x)
|
|
|
|
|
(progn
|
|
|
|
|
(setq x (math-read-exprs x))
|
|
|
|
|
(if (eq (car-safe x)
|
|
|
|
|
'error)
|
|
|
|
|
(throw 'calc-error
|
|
|
|
|
(calc-eval-error
|
|
|
|
|
(cdr x)))
|
|
|
|
|
(car x)))
|
|
|
|
|
x))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
args))
|
|
|
|
|
(calc-dollar-used 0)
|
|
|
|
|
(res (if (stringp str)
|
|
|
|
|
(math-read-exprs str)
|
|
|
|
|
(list str)))
|
|
|
|
|
buf)
|
|
|
|
|
(if (eq (car res) 'error)
|
|
|
|
|
(calc-eval-error (cdr res))
|
|
|
|
|
(setq res (mapcar 'calc-normalize res))
|
|
|
|
|
(and (memq 'clear-message calc-command-flags)
|
|
|
|
|
(message ""))
|
|
|
|
|
(cond ((eq separator 'pred)
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (= (length res) 1)
|
|
|
|
|
(math-is-true (car res))
|
|
|
|
|
(calc-eval-error '(0 "Single value expected"))))
|
|
|
|
|
((eq separator 'raw)
|
|
|
|
|
(if (= (length res) 1)
|
|
|
|
|
(car res)
|
|
|
|
|
(calc-eval-error '(0 "Single value expected"))))
|
|
|
|
|
((eq separator 'list)
|
|
|
|
|
res)
|
|
|
|
|
((memq separator '(num rawnum))
|
|
|
|
|
(if (= (length res) 1)
|
|
|
|
|
(if (math-constp (car res))
|
|
|
|
|
(if (eq separator 'num)
|
|
|
|
|
(math-format-value (car res) 1000)
|
|
|
|
|
(car res))
|
|
|
|
|
(calc-eval-error
|
|
|
|
|
(list 0
|
|
|
|
|
(if calc-next-why
|
|
|
|
|
(calc-explain-why (car calc-next-why))
|
|
|
|
|
"Number expected"))))
|
|
|
|
|
(calc-eval-error '(0 "Single value expected"))))
|
|
|
|
|
((eq separator 'push)
|
|
|
|
|
(calc-push-list res)
|
|
|
|
|
nil)
|
|
|
|
|
(t (while res
|
|
|
|
|
(setq buf (concat buf
|
|
|
|
|
(and buf (or separator ", "))
|
|
|
|
|
(math-format-value (car res) 1000))
|
|
|
|
|
res (cdr res)))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
buf)))))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2004-11-27 04:07:22 +00:00
|
|
|
|
(defvar calc-eval-error nil
|
|
|
|
|
"Determines how calc handles errors.
|
2006-12-10 23:48:40 +00:00
|
|
|
|
If nil, return a list containing the character position of error.
|
2004-11-27 04:07:22 +00:00
|
|
|
|
STRING means return error message as string rather than list.
|
2006-12-10 23:48:40 +00:00
|
|
|
|
The value t means abort and give an error message.")
|
2004-11-27 04:07:22 +00:00
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-eval-error (msg)
|
2004-11-27 04:07:22 +00:00
|
|
|
|
(if calc-eval-error
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (eq calc-eval-error 'string)
|
|
|
|
|
(nth 1 msg)
|
|
|
|
|
(error "%s" (nth 1 msg)))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
msg))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Reading an expression in algebraic form.
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-auto-algebraic-entry (&optional prefix)
|
|
|
|
|
(interactive "P")
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(calc-algebraic-entry prefix t))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-algebraic-entry (&optional prefix auto)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(calc-wrapper
|
|
|
|
|
(let ((calc-language (if prefix nil calc-language))
|
2007-06-20 04:12:15 +00:00
|
|
|
|
(math-expr-opers (if prefix (math-standard-ops) (math-expr-ops))))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(calc-alg-entry (and auto (char-to-string last-command-event))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(defvar calc-alg-entry-history nil
|
|
|
|
|
"History for algebraic entry.")
|
|
|
|
|
|
2020-10-10 16:00:51 -04:00
|
|
|
|
(defvar calc-plain-entry nil)
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-alg-entry (&optional initial prompt)
|
2012-09-19 23:44:57 -04:00
|
|
|
|
(let* ((calc-dollar-values (mapcar #'calc-get-stack-element
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(nthcdr calc-stack-top calc-stack)))
|
|
|
|
|
(calc-dollar-used 0)
|
|
|
|
|
(calc-plain-entry t)
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(alg-exp (calc-do-alg-entry initial prompt t 'calc-alg-entry-history)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (stringp alg-exp)
|
|
|
|
|
(progn
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(calc-alg-edit alg-exp))
|
2009-01-09 03:57:12 +00:00
|
|
|
|
(let* ((calc-simplify-mode (if (eq last-command-event ?\C-j)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
'none
|
|
|
|
|
calc-simplify-mode))
|
|
|
|
|
(nvals (mapcar 'calc-normalize alg-exp)))
|
|
|
|
|
(while alg-exp
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(calc-record (if (featurep 'calc-ext) (car alg-exp) (car nvals))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
"alg'")
|
|
|
|
|
(calc-pop-push-record-list calc-dollar-used
|
|
|
|
|
(and (not (equal (car alg-exp)
|
|
|
|
|
(car nvals)))
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(featurep 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
"")
|
|
|
|
|
(list (car nvals)))
|
|
|
|
|
(setq alg-exp (cdr alg-exp)
|
|
|
|
|
nvals (cdr nvals)
|
|
|
|
|
calc-dollar-used 0)))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(calc-handle-whys))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2010-09-03 13:26:08 +02:00
|
|
|
|
(defvar calc-alg-ent-map
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
(set-keymap-parent map minibuffer-local-map)
|
|
|
|
|
(define-key map "'" 'calcAlg-previous)
|
|
|
|
|
(define-key map "`" 'calcAlg-edit)
|
|
|
|
|
(define-key map "\C-m" 'calcAlg-enter)
|
|
|
|
|
(define-key map "\C-j" 'calcAlg-enter)
|
|
|
|
|
map)
|
2004-10-21 19:20:11 +00:00
|
|
|
|
"The keymap used for algebraic entry.")
|
|
|
|
|
|
2010-09-03 13:26:08 +02:00
|
|
|
|
(defvar calc-alg-ent-esc-map
|
|
|
|
|
(let ((map (make-keymap))
|
|
|
|
|
(i 33))
|
|
|
|
|
(set-keymap-parent map esc-map)
|
|
|
|
|
(while (< i 127)
|
|
|
|
|
(define-key map (vector i) 'calcAlg-escape)
|
|
|
|
|
(setq i (1+ i)))
|
|
|
|
|
map)
|
2004-10-21 19:20:11 +00:00
|
|
|
|
"The keymap used for escapes in algebraic entry.")
|
|
|
|
|
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(defvar calc-alg-exp)
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(defun calc-do-alg-entry (&optional initial prompt no-normalize history)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let* ((calc-buffer (current-buffer))
|
2010-09-03 13:26:08 +02:00
|
|
|
|
(blink-matching-check-function 'calcAlg-blink-matching-check)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(calc-alg-exp 'error))
|
2004-10-19 14:22:47 +00:00
|
|
|
|
(define-key calc-alg-ent-map "\e" nil)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (eq calc-algebraic-mode 'total)
|
|
|
|
|
(define-key calc-alg-ent-map "\e" calc-alg-ent-esc-map)
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(define-key calc-alg-ent-map "\e+" 'calcAlg-plus-minus)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(define-key calc-alg-ent-map "\em" 'calcAlg-mod)
|
|
|
|
|
(define-key calc-alg-ent-map "\e=" 'calcAlg-equals)
|
|
|
|
|
(define-key calc-alg-ent-map "\e\r" 'calcAlg-equals)
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(define-key calc-alg-ent-map "\ep" 'previous-history-element)
|
|
|
|
|
(define-key calc-alg-ent-map "\en" 'next-history-element)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(define-key calc-alg-ent-map "\e%" 'self-insert-command))
|
|
|
|
|
(setq calc-aborted-prefix nil)
|
|
|
|
|
(let ((buf (read-from-minibuffer (or prompt "Algebraic: ")
|
|
|
|
|
(or initial "")
|
2006-07-20 20:23:06 +00:00
|
|
|
|
calc-alg-ent-map nil history)))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(when (eq calc-alg-exp 'error)
|
|
|
|
|
(when (eq (car-safe (setq calc-alg-exp (math-read-exprs buf))) 'error)
|
|
|
|
|
(setq calc-alg-exp nil)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq calc-aborted-prefix "alg'")
|
|
|
|
|
(or no-normalize
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(and calc-alg-exp (setq calc-alg-exp (mapcar 'calc-normalize calc-alg-exp))))
|
|
|
|
|
calc-alg-exp)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcAlg-plus-minus ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(if (calc-minibuffer-contains ".* \\'")
|
|
|
|
|
(insert "+/- ")
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(insert " +/- ")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcAlg-mod ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(if (not (calc-minibuffer-contains ".* \\'"))
|
|
|
|
|
(insert " "))
|
|
|
|
|
(if (calc-minibuffer-contains ".* mod +\\'")
|
|
|
|
|
(if calc-previous-modulo
|
|
|
|
|
(insert (math-format-flat-expr calc-previous-modulo 0))
|
|
|
|
|
(beep))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(insert "mod ")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcAlg-previous ()
|
|
|
|
|
(interactive)
|
2004-10-19 15:34:38 +00:00
|
|
|
|
(if (calc-minibuffer-contains "\\'")
|
2006-07-20 20:23:06 +00:00
|
|
|
|
(previous-history-element 1)
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(insert "'")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcAlg-equals ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(calcAlg-enter)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(if (consp calc-alg-exp)
|
|
|
|
|
(progn (setq prefix-arg (length calc-alg-exp))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(calc-unread-command ?=)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcAlg-escape ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(calc-unread-command)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(calc-select-buffer)
|
|
|
|
|
(use-local-map calc-mode-map))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(calcAlg-enter))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun calcAlg-edit ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(if (or (not calc-plain-entry)
|
|
|
|
|
(calc-minibuffer-contains
|
|
|
|
|
"\\`\\([^\"]*\"[^\"]*\"\\)*[^\"]*\"[^\"]*\\'"))
|
|
|
|
|
(insert "`")
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq calc-alg-exp (minibuffer-contents))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(exit-minibuffer)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2004-11-27 04:07:22 +00:00
|
|
|
|
(defvar calc-buffer)
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calcAlg-enter ()
|
|
|
|
|
(interactive)
|
2001-11-11 10:26:44 +00:00
|
|
|
|
(let* ((str (minibuffer-contents))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(exp (and (> (length str) 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 calc-buffer
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-exprs str)))))
|
|
|
|
|
(if (eq (car-safe exp) 'error)
|
|
|
|
|
(progn
|
2001-11-11 10:26:44 +00:00
|
|
|
|
(goto-char (minibuffer-prompt-end))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(forward-char (nth 1 exp))
|
|
|
|
|
(beep)
|
|
|
|
|
(calc-temp-minibuffer-message
|
|
|
|
|
(concat " [" (or (nth 2 exp) "Error") "]"))
|
|
|
|
|
(calc-clear-unread-commands))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq calc-alg-exp (if (calc-minibuffer-contains "\\` *\\[ *\\'")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
'((incomplete vec))
|
|
|
|
|
exp))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(exit-minibuffer))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2010-09-03 13:26:08 +02:00
|
|
|
|
(defun calcAlg-blink-matching-check (leftpt rightpt)
|
|
|
|
|
(let ((rightchar (char-before rightpt))
|
|
|
|
|
(leftchar (if leftpt (char-after leftpt))))
|
2004-12-19 06:59:33 +00:00
|
|
|
|
(if (and leftpt
|
|
|
|
|
(or (and (= rightchar ?\))
|
|
|
|
|
(= leftchar ?\[))
|
|
|
|
|
(and (= rightchar ?\])
|
|
|
|
|
(= leftchar ?\()))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char leftpt)
|
|
|
|
|
(looking-at ".+\\(\\.\\.\\|\\\\dots\\|\\\\ldots\\)")))
|
2010-09-03 13:26:08 +02:00
|
|
|
|
;; [2..5) perfectly valid!
|
|
|
|
|
nil
|
|
|
|
|
(blink-matching-check-mismatch leftpt rightpt))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-alg-digit-entry ()
|
2003-02-04 13:24:35 +00:00
|
|
|
|
(calc-alg-entry
|
2015-10-08 08:32:00 -05:00
|
|
|
|
(calc-digit-start-entry)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2004-11-27 04:07:22 +00:00
|
|
|
|
;; The variable calc-digit-value is initially declared in calc.el,
|
|
|
|
|
;; but can be set by calcDigit-algebraic and calcDigit-edit.
|
|
|
|
|
(defvar calc-digit-value)
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calcDigit-algebraic ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(if (calc-minibuffer-contains ".*[@oh] *[^'m ]+[^'m]*\\'")
|
|
|
|
|
(calcDigit-key)
|
2001-11-11 10:26:44 +00:00
|
|
|
|
(setq calc-digit-value (minibuffer-contents))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(exit-minibuffer)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calcDigit-edit ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(calc-unread-command)
|
2001-11-11 10:26:44 +00:00
|
|
|
|
(setq calc-digit-value (minibuffer-contents))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(exit-minibuffer))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Algebraic expression parsing. [Public]
|
|
|
|
|
|
2004-12-08 06:09:20 +00:00
|
|
|
|
(defvar math-read-replacement-list
|
|
|
|
|
'(;; Misc symbols
|
|
|
|
|
("±" "+/-") ; plus or minus
|
|
|
|
|
("×" "*") ; multiplication sign
|
|
|
|
|
("÷" ":") ; division sign
|
|
|
|
|
("−" "-") ; subtraction sign
|
|
|
|
|
("∕" "/") ; division sign
|
|
|
|
|
("∗" "*") ; asterisk multiplication
|
|
|
|
|
("∞" "inf") ; infinity symbol
|
|
|
|
|
("≤" "<=")
|
|
|
|
|
("≥" ">=")
|
|
|
|
|
("≦" "<=")
|
|
|
|
|
("≧" ">=")
|
2010-05-14 23:50:25 -05:00
|
|
|
|
("µ" "μ")
|
2004-12-08 06:09:20 +00:00
|
|
|
|
;; fractions
|
|
|
|
|
("¼" "(1:4)") ; 1/4
|
|
|
|
|
("½" "(1:2)") ; 1/2
|
|
|
|
|
("¾" "(3:4)") ; 3/4
|
|
|
|
|
("⅓" "(1:3)") ; 1/3
|
|
|
|
|
("⅔" "(2:3)") ; 2/3
|
|
|
|
|
("⅕" "(1:5)") ; 1/5
|
|
|
|
|
("⅖" "(2:5)") ; 2/5
|
|
|
|
|
("⅗" "(3:5)") ; 3/5
|
|
|
|
|
("⅘" "(4:5)") ; 4/5
|
|
|
|
|
("⅙" "(1:6)") ; 1/6
|
|
|
|
|
("⅚" "(5:6)") ; 5/6
|
|
|
|
|
("⅛" "(1:8)") ; 1/8
|
|
|
|
|
("⅜" "(3:8)") ; 3/8
|
|
|
|
|
("⅝" "(5:8)") ; 5/8
|
|
|
|
|
("⅞" "(7:8)") ; 7/8
|
|
|
|
|
("⅟" "1:") ; 1/...
|
|
|
|
|
;; superscripts
|
|
|
|
|
("⁰" "0") ; 0
|
|
|
|
|
("¹" "1") ; 1
|
|
|
|
|
("²" "2") ; 2
|
|
|
|
|
("³" "3") ; 3
|
|
|
|
|
("⁴" "4") ; 4
|
|
|
|
|
("⁵" "5") ; 5
|
|
|
|
|
("⁶" "6") ; 6
|
|
|
|
|
("⁷" "7") ; 7
|
|
|
|
|
("⁸" "8") ; 8
|
|
|
|
|
("⁹" "9") ; 9
|
|
|
|
|
("⁺" "+") ; +
|
|
|
|
|
("⁻" "-") ; -
|
|
|
|
|
("⁽" "(") ; (
|
|
|
|
|
("⁾" ")") ; )
|
|
|
|
|
("ⁿ" "n") ; n
|
2005-04-05 03:50:26 +00:00
|
|
|
|
("ⁱ" "i") ; i
|
|
|
|
|
;; subscripts
|
|
|
|
|
("₀" "0") ; 0
|
|
|
|
|
("₁" "1") ; 1
|
|
|
|
|
("₂" "2") ; 2
|
|
|
|
|
("₃" "3") ; 3
|
|
|
|
|
("₄" "4") ; 4
|
|
|
|
|
("₅" "5") ; 5
|
|
|
|
|
("₆" "6") ; 6
|
|
|
|
|
("₇" "7") ; 7
|
|
|
|
|
("₈" "8") ; 8
|
|
|
|
|
("₉" "9") ; 9
|
|
|
|
|
("₊" "+") ; +
|
|
|
|
|
("₋" "-") ; -
|
|
|
|
|
("₍" "(") ; (
|
|
|
|
|
("₎" ")")) ; )
|
2004-12-08 06:09:20 +00:00
|
|
|
|
"A list whose elements (old new) indicate replacements to make
|
|
|
|
|
in Calc algebraic input.")
|
|
|
|
|
|
|
|
|
|
(defvar math-read-superscripts
|
|
|
|
|
"⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁽⁾ⁿⁱ" ; 0123456789+-()ni
|
|
|
|
|
"A string consisting of the superscripts allowed by Calc.")
|
|
|
|
|
|
2005-04-05 03:50:26 +00:00
|
|
|
|
(defvar math-read-subscripts
|
|
|
|
|
"₀₁₂₃₄₅₆₇₈₉₊₋₍₎" ; 0123456789+-()
|
|
|
|
|
"A string consisting of the subscripts allowed by Calc.")
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2004-12-08 06:09:20 +00:00
|
|
|
|
(defun math-read-preprocess-string (str)
|
|
|
|
|
"Replace some substrings of STR by Calc equivalents."
|
|
|
|
|
(setq str
|
|
|
|
|
(replace-regexp-in-string (concat "[" math-read-superscripts "]+")
|
|
|
|
|
"^(\\&)" str))
|
2005-04-05 03:50:26 +00:00
|
|
|
|
(setq str
|
|
|
|
|
(replace-regexp-in-string (concat "[" math-read-subscripts "]+")
|
|
|
|
|
"_(\\&)" str))
|
2004-12-08 06:09:20 +00:00
|
|
|
|
(let ((rep-list math-read-replacement-list))
|
|
|
|
|
(while rep-list
|
|
|
|
|
(setq str
|
|
|
|
|
(replace-regexp-in-string (nth 0 (car rep-list))
|
|
|
|
|
(nth 1 (car rep-list)) str))
|
|
|
|
|
(setq rep-list (cdr rep-list))))
|
|
|
|
|
str)
|
|
|
|
|
|
2004-11-27 04:07:22 +00:00
|
|
|
|
;; The next few variables are local to math-read-exprs (and math-read-expr
|
|
|
|
|
;; in calc-ext.el), but are set in functions they call.
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
|
|
|
|
|
(defvar math-exp-pos)
|
|
|
|
|
(defvar math-exp-str)
|
|
|
|
|
(defvar math-exp-old-pos)
|
|
|
|
|
(defvar math-exp-token)
|
|
|
|
|
(defvar math-exp-keep-spaces)
|
2004-11-27 04:07:22 +00:00
|
|
|
|
(defvar math-expr-data)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2020-10-10 16:00:51 -04:00
|
|
|
|
(defun math-read-exprs (str)
|
|
|
|
|
(let ((math-exp-str str)
|
|
|
|
|
(math-exp-pos 0)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(math-exp-old-pos 0)
|
|
|
|
|
(math-exp-keep-spaces nil)
|
|
|
|
|
math-exp-token math-expr-data)
|
2004-11-23 05:58:20 +00:00
|
|
|
|
(setq math-exp-str (math-read-preprocess-string math-exp-str))
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(if (memq calc-language calc-lang-allow-percentsigns)
|
|
|
|
|
(setq math-exp-str (math-remove-percentsigns math-exp-str)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if calc-language-input-filter
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-str (funcall calc-language-input-filter math-exp-str)))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(while (setq math-exp-token
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(string-match "\\.\\.\\([^.]\\|.[^.]\\)" math-exp-str))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(setq math-exp-str
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(concat (substring math-exp-str 0 math-exp-token) "\\dots"
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(substring math-exp-str (+ math-exp-token 2)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-build-parse-table)
|
|
|
|
|
(math-read-token)
|
|
|
|
|
(let ((val (catch 'syntax (math-read-expr-list))))
|
|
|
|
|
(if (stringp val)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(list 'error math-exp-old-pos val)
|
|
|
|
|
(if (equal math-exp-token 'end)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
val
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(list 'error math-exp-old-pos "Syntax error"))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-read-expr-list ()
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(let* ((math-exp-keep-spaces nil)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(val (list (math-read-expr-level 0)))
|
|
|
|
|
(last val))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(while (equal math-expr-data ",")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
|
|
|
|
(let ((rest (list (math-read-expr-level 0))))
|
|
|
|
|
(setcdr last rest)
|
|
|
|
|
(setq last rest)))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
val))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2001-11-19 07:44:56 +00:00
|
|
|
|
(defvar calc-user-parse-table nil)
|
|
|
|
|
(defvar calc-last-main-parse-table nil)
|
2007-11-16 23:48:26 +00:00
|
|
|
|
(defvar calc-last-user-lang-parse-table nil)
|
2001-11-19 07:44:56 +00:00
|
|
|
|
(defvar calc-last-lang-parse-table nil)
|
|
|
|
|
(defvar calc-user-tokens nil)
|
|
|
|
|
(defvar calc-user-token-chars nil)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(defvar math-toks nil
|
|
|
|
|
"Tokens to pass between math-build-parse-table and math-find-user-tokens.")
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-build-parse-table ()
|
|
|
|
|
(let ((mtab (cdr (assq nil calc-user-parse-tables)))
|
2007-11-16 23:48:26 +00:00
|
|
|
|
(ltab (cdr (assq calc-language calc-user-parse-tables)))
|
|
|
|
|
(lltab (get calc-language 'math-parse-table)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or (and (eq mtab calc-last-main-parse-table)
|
2007-11-16 23:48:26 +00:00
|
|
|
|
(eq ltab calc-last-user-lang-parse-table)
|
|
|
|
|
(eq lltab calc-last-lang-parse-table))
|
|
|
|
|
(let ((p (append mtab ltab lltab))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(math-toks nil))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq calc-user-parse-table p)
|
|
|
|
|
(setq calc-user-token-chars nil)
|
|
|
|
|
(while p
|
|
|
|
|
(math-find-user-tokens (car (car p)))
|
|
|
|
|
(setq p (cdr p)))
|
|
|
|
|
(setq calc-user-tokens (mapconcat 'identity
|
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
|
|
|
|
(sort (mapcar #'car math-toks)
|
|
|
|
|
(lambda (x y)
|
|
|
|
|
(> (length x)
|
|
|
|
|
(length y))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
"\\|")
|
|
|
|
|
calc-last-main-parse-table mtab
|
2007-11-16 23:48:26 +00:00
|
|
|
|
calc-last-user-lang-parse-table ltab
|
|
|
|
|
calc-last-lang-parse-table lltab)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(defun math-find-user-tokens (p)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(while p
|
|
|
|
|
(cond ((and (stringp (car p))
|
|
|
|
|
(or (> (length (car p)) 1) (equal (car p) "$")
|
|
|
|
|
(equal (car p) "\""))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(string-match "[^a-zA-Zα-ωΑ-Ω0-9]" (car p)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((s (regexp-quote (car p))))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(if (string-match "\\`[a-zA-Zα-ωΑ-Ω0-9]" s)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq s (concat "\\<" s)))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(if (string-match "[a-zA-Zα-ωΑ-Ω0-9]\\'" s)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq s (concat s "\\>")))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(or (assoc s math-toks)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-toks (cons (list s) math-toks))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or (memq (aref (car p) 0) calc-user-token-chars)
|
|
|
|
|
(setq calc-user-token-chars
|
|
|
|
|
(cons (aref (car p) 0)
|
|
|
|
|
calc-user-token-chars)))))))
|
|
|
|
|
((consp (car p))
|
|
|
|
|
(math-find-user-tokens (nth 1 (car p)))
|
|
|
|
|
(or (eq (car (car p)) '\?)
|
|
|
|
|
(math-find-user-tokens (nth 2 (car p))))))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(setq p (cdr p))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-read-token ()
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(if (>= math-exp-pos (length math-exp-str))
|
|
|
|
|
(setq math-exp-old-pos math-exp-pos
|
|
|
|
|
math-exp-token 'end
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data "\000")
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(let (adfn
|
|
|
|
|
(ch (aref math-exp-str math-exp-pos)))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-old-pos math-exp-pos)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cond ((memq ch '(32 10 9))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-pos (1+ math-exp-pos))
|
|
|
|
|
(if math-exp-keep-spaces
|
|
|
|
|
(setq math-exp-token 'space
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data " ")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)))
|
|
|
|
|
((and (memq ch calc-user-token-chars)
|
|
|
|
|
(let ((case-fold-search nil))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(eq (string-match
|
2007-12-26 17:32:13 +00:00
|
|
|
|
calc-user-tokens math-exp-str math-exp-pos)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-pos)))
|
|
|
|
|
(setq math-exp-token 'punc
|
|
|
|
|
math-expr-data (math-match-substring math-exp-str 0)
|
|
|
|
|
math-exp-pos (match-end 0)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((or (and (>= ch ?a) (<= ch ?z))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(and (>= ch ?A) (<= ch ?Z))
|
|
|
|
|
(and (>= ch ?α) (<= ch ?ω))
|
|
|
|
|
(and (>= ch ?Α) (<= ch ?Ω)))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(string-match
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(cond
|
|
|
|
|
((and (memq calc-language calc-lang-allow-underscores)
|
|
|
|
|
(memq calc-language calc-lang-allow-percentsigns))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
"[a-zA-Zα-ωΑ-Ω0-9_'#]*")
|
2007-12-26 17:32:13 +00:00
|
|
|
|
((memq calc-language calc-lang-allow-underscores)
|
2010-05-14 23:50:25 -05:00
|
|
|
|
"[a-zA-Zα-ωΑ-Ω0-9_#]*")
|
|
|
|
|
(t "[a-zA-Zα-ωΑ-Ω0-9'#]*"))
|
2007-12-26 17:32:13 +00:00
|
|
|
|
math-exp-str math-exp-pos)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-token 'symbol
|
|
|
|
|
math-exp-pos (match-end 0)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data (math-restore-dashes
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(math-match-substring math-exp-str 0)))
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(if (setq adfn (get calc-language 'math-lang-adjust-words))
|
|
|
|
|
(funcall adfn)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((or (and (>= ch ?0) (<= ch ?9))
|
|
|
|
|
(and (eq ch '?\.)
|
2006-12-10 23:48:40 +00:00
|
|
|
|
(eq (string-match "\\.[0-9]" math-exp-str math-exp-pos)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-pos))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(and (eq ch '?_)
|
2006-12-10 23:48:40 +00:00
|
|
|
|
(eq (string-match "_\\.?[0-9]" math-exp-str math-exp-pos)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-pos)
|
|
|
|
|
(or (eq math-exp-pos 0)
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(and (not (memq calc-language
|
2007-12-02 03:13:28 +00:00
|
|
|
|
calc-lang-allow-underscores))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(eq (string-match "[^])}\"a-zA-Zα-ωΑ-Ω0-9'$]_"
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-str (1- math-exp-pos))
|
|
|
|
|
(1- math-exp-pos))))))
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(or (and (memq calc-language calc-lang-c-type-hex)
|
Replace manually crafted hex regexes with [:xdigit:]
* admin/charsets/mapconv:
* build-aux/gitlog-to-changelog (parse_amend_file, git_dir_option):
* lisp/progmodes/verilog-mode.el (verilog-delay-re):
(verilog-type-font-keywords, verilog-read-always-signals-recurse):
(verilog-is-number):
* lisp/progmodes/vera-mode.el (vera-font-lock-keywords):
* test/src/emacs-module-tests.el (mod-test-sum-test):
* lisp/xml.el: (xml--entity-replacement-text):
* lisp/version.el (emacs-repository-version-git):
* lisp/textmodes/sgml-mode.el (sgml-quote):
* lisp/textmodes/css-mode.el (css-escapes-re)
(css--colors-regexp):
* lisp/progmodes/prolog.el (prolog-syntax-propertize-function):
* lisp/progmodes/hideif.el (hif-token-regexp, hif-tokenize):
* lisp/progmodes/ebnf-dtd.el: (ebnf-dtd-attlistdecl)
(ebnf-dtd-entitydecl, ebnf-dtd-lex):
* lisp/progmodes/ebnf-ebx.el (ebnf-ebx-hex-character):
* lisp/progmodes/ebnf-abn.el (ebnf-abn-character):
* lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
(cperl-find-pods-heres):
* lisp/progmodes/cc-mode.el (c-maybe-quoted-number-head)
(c-maybe-quoted-number, c-parse-quotes-before-change)
(c-parse-quotes-after-change, c-quoted-number-head-before-point)
(c-quoted-number-straddling-point):
* lisp/progmodes/ada-mode.el (featurep, ada-in-numeric-literal-p)
(ada-font-lock-keywords):
* lisp/org/org-mobile.el (org-mobile-copy-agenda-files)
* lisp/org/org-table.el (org-table-number-regexp):
(org-mobile-update-checksum-for-capture-file):
* lisp/nxml/xsd-regexp.el (xsdre-gen-categories):
* lisp/nxml/xmltok.el (let*):
* lisp/nxml/rng-xsd.el (rng-xsd-convert-hex-binary)
(rng-xsd-convert-any-uri):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1)
(rng-uri-unescape-multibyte, rng-uri-unescape-unibyte)
(rng-uri-unescape-unibyte-match)
(rng-uri-unescape-unibyte-replace):
* lisp/nxml/rng-cmpct.el (rng-c-process-escapes):
* lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* lisp/net/shr-color.el (shr-color->hexadecimal):
* lisp/mail/rfc2231.el (rfc2231-decode-encoded-string):
* lisp/international/mule-cmds.el (read-char-by-name):
* lisp/htmlfontify.el (hfy-hex-regex):
* lisp/gnus/nneething.el (nneething-decode-file-name):
* lisp/gnus/mml-sec.el (mml-secure-find-usable-keys):
* lisp/gnus/gnus-art.el (gnus-button-mid-or-mail-heuristic-alist):
* lisp/faces.el (read-color):
* lisp/epg.el (epg--status-ERRSIG, epg--status-VALIDSIG)
(epg--status-SIG_CREATED, epg--decode-percent-escape)
(epg--decode-hexstring, epg--decode-quotedstring)
(epg-dn-from-string):
* lisp/emulation/cua-rect.el (cua-incr-rectangle):
* lisp/dnd.el (dnd-unescape-uri):
* lisp/cedet/semantic/lex.el (semantic-lex-number-expression):
* lisp/cedet/semantic/java.el (semantic-java-number-regexp):
* lisp/calc/calc-lang.el (pascal):
* lisp/calc/calc-ext.el (math-read-number-fancy):
* lisp/calc/calc-aent.el (math-read-token):
Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
(Bug#36167)
2019-06-13 03:18:43 +03:00
|
|
|
|
(eq (string-match "0[xX][[:xdigit:]]+" math-exp-str
|
2017-11-18 12:29:41 +02:00
|
|
|
|
math-exp-pos)
|
|
|
|
|
math-exp-pos))
|
2010-05-14 23:50:25 -05:00
|
|
|
|
(string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-zA-Zα-ωΑ-Ω:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?"
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-str math-exp-pos))
|
|
|
|
|
(setq math-exp-token 'number
|
|
|
|
|
math-expr-data (math-match-substring math-exp-str 0)
|
|
|
|
|
math-exp-pos (match-end 0)))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
((and (setq adfn
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(assq ch (get calc-language 'math-lang-read-symbol)))
|
2020-10-10 16:00:51 -04:00
|
|
|
|
(eval (nth 1 adfn) t))
|
|
|
|
|
(eval (nth 2 adfn) t))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((eq ch ?\$)
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(if (eq (string-match "\\$\\([1-9][0-9]*\\)" math-exp-str math-exp-pos)
|
|
|
|
|
math-exp-pos)
|
|
|
|
|
(setq math-expr-data (- (string-to-number (math-match-substring
|
|
|
|
|
math-exp-str 1))))
|
|
|
|
|
(string-match "\\$+" math-exp-str math-exp-pos)
|
|
|
|
|
(setq math-expr-data (- (match-end 0) (match-beginning 0))))
|
|
|
|
|
(setq math-exp-token 'dollar
|
|
|
|
|
math-exp-pos (match-end 0)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((eq ch ?\#)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(if (eq (string-match "#\\([1-9][0-9]*\\)" math-exp-str math-exp-pos)
|
|
|
|
|
math-exp-pos)
|
2005-05-02 19:40:50 +00:00
|
|
|
|
(setq math-expr-data (string-to-number
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(math-match-substring math-exp-str 1))
|
|
|
|
|
math-exp-pos (match-end 0))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(setq math-expr-data 1
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-pos (1+ math-exp-pos)))
|
|
|
|
|
(setq math-exp-token 'hash))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((eq (string-match "~=\\|<=\\|>=\\|<>\\|/=\\|\\+/-\\|\\\\dots\\|\\\\ldots\\|\\*\\*\\|<<\\|>>\\|==\\|!=\\|&&&\\||||\\|!!!\\|&&\\|||\\|!!\\|:=\\|::\\|=>"
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-str math-exp-pos)
|
|
|
|
|
math-exp-pos)
|
|
|
|
|
(setq math-exp-token 'punc
|
|
|
|
|
math-expr-data (math-match-substring math-exp-str 0)
|
|
|
|
|
math-exp-pos (match-end 0)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
((and (eq ch ?\")
|
2006-12-10 23:48:40 +00:00
|
|
|
|
(string-match "\\(\"\\([^\"\\]\\|\\\\.\\)*\\)\\(\"\\|\\'\\)"
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-str math-exp-pos))
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(setq math-exp-token 'string
|
|
|
|
|
math-expr-data (math-match-substring math-exp-str 1)
|
|
|
|
|
math-exp-pos (match-end 0)))
|
2007-12-29 00:23:41 +00:00
|
|
|
|
((and (setq adfn (get calc-language 'math-lang-read))
|
2020-10-10 16:00:51 -04:00
|
|
|
|
(eval (nth 0 adfn) t)
|
|
|
|
|
(eval (nth 1 adfn) t)))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
((eq (string-match "%%.*$" math-exp-str math-exp-pos) math-exp-pos)
|
|
|
|
|
(setq math-exp-pos (match-end 0))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token))
|
|
|
|
|
(t
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(if (setq adfn (assq ch (get calc-language 'math-punc-table)))
|
|
|
|
|
(setq ch (cdr adfn)))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-token 'punc
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data (char-to-string ch)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-pos (1+ math-exp-pos)))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2004-11-27 04:07:22 +00:00
|
|
|
|
(defconst math-alg-inequalities
|
|
|
|
|
'(calcFunc-lt calcFunc-gt calcFunc-leq calcFunc-geq
|
|
|
|
|
calcFunc-eq calcFunc-neq))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-read-expr-level (exp-prec &optional exp-term)
|
2007-06-20 04:12:15 +00:00
|
|
|
|
(let* ((math-expr-opers (math-expr-ops))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(x (math-read-factor))
|
|
|
|
|
(first t)
|
2007-06-20 04:12:15 +00:00
|
|
|
|
op op2)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(while (and (or (and calc-user-parse-table
|
|
|
|
|
(setq op (calc-check-user-syntax x exp-prec))
|
|
|
|
|
(setq x op
|
|
|
|
|
op '("2x" ident 999999 -1)))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(and (setq op (assoc math-expr-data math-expr-opers))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(/= (nth 2 op) -1)
|
|
|
|
|
(or (and (setq op2 (assoc
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cdr (memq op math-expr-opers))))
|
|
|
|
|
(eq (= (nth 3 op) -1)
|
|
|
|
|
(/= (nth 3 op2) -1))
|
|
|
|
|
(eq (= (nth 3 op2) -1)
|
|
|
|
|
(not (math-factor-after)))
|
|
|
|
|
(setq op op2))
|
|
|
|
|
t))
|
|
|
|
|
(and (or (eq (nth 2 op) -1)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(memq math-exp-token '(symbol number dollar hash))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(equal math-expr-data "(")
|
|
|
|
|
(and (equal math-expr-data "[")
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(not (equal
|
|
|
|
|
(get calc-language
|
2007-12-02 03:13:28 +00:00
|
|
|
|
'math-function-open) "["))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(not (and math-exp-keep-spaces
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(eq (car-safe x) 'vec)))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(or (not (setq op (assoc math-expr-data math-expr-opers)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(/= (nth 2 op) -1))
|
|
|
|
|
(or (not calc-user-parse-table)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(not (eq math-exp-token 'symbol))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((p calc-user-parse-table))
|
|
|
|
|
(while (and p
|
|
|
|
|
(or (not (integerp
|
|
|
|
|
(car (car (car p)))))
|
|
|
|
|
(not (equal
|
|
|
|
|
(nth 1 (car (car p)))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq p (cdr p)))
|
|
|
|
|
(not p)))
|
|
|
|
|
(setq op (assoc "2x" math-expr-opers))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(not (and exp-term (equal math-expr-data exp-term)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(>= (nth 2 op) exp-prec))
|
|
|
|
|
(if (not (equal (car op) "2x"))
|
|
|
|
|
(math-read-token))
|
|
|
|
|
(and (memq (nth 1 op) '(sdev mod))
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq x (cond ((consp (nth 1 op))
|
|
|
|
|
(funcall (car (nth 1 op)) x op))
|
|
|
|
|
((eq (nth 3 op) -1)
|
|
|
|
|
(if (eq (nth 1 op) 'ident)
|
|
|
|
|
x
|
|
|
|
|
(if (eq (nth 1 op) 'closing)
|
|
|
|
|
(if (eq (nth 2 op) exp-prec)
|
|
|
|
|
(progn
|
|
|
|
|
(setq exp-prec 1000)
|
|
|
|
|
x)
|
|
|
|
|
(throw 'syntax "Mismatched delimiters"))
|
|
|
|
|
(list (nth 1 op) x))))
|
|
|
|
|
((and (not first)
|
|
|
|
|
(memq (nth 1 op) math-alg-inequalities)
|
|
|
|
|
(memq (car-safe x) math-alg-inequalities))
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-composite-inequalities x op))
|
|
|
|
|
(t (list (nth 1 op)
|
|
|
|
|
x
|
|
|
|
|
(math-read-expr-level (nth 3 op) exp-term))))
|
|
|
|
|
first nil))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
x))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2005-05-28 04:40:31 +00:00
|
|
|
|
;; calc-arg-values is defined in calc-ext.el, but is used here.
|
|
|
|
|
(defvar calc-arg-values)
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-check-user-syntax (&optional x prec)
|
|
|
|
|
(let ((p calc-user-parse-table)
|
|
|
|
|
(matches nil)
|
|
|
|
|
match rule)
|
|
|
|
|
(while (and p
|
|
|
|
|
(or (not (progn
|
|
|
|
|
(setq rule (car (car p)))
|
|
|
|
|
(if x
|
|
|
|
|
(and (integerp (car rule))
|
|
|
|
|
(>= (car rule) prec)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(equal math-expr-data
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(car (setq rule (cdr rule)))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(equal math-expr-data (car rule)))))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(let ((save-exp-pos math-exp-pos)
|
|
|
|
|
(save-exp-old-pos math-exp-old-pos)
|
|
|
|
|
(save-exp-token math-exp-token)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(save-exp-data math-expr-data))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or (not (listp
|
|
|
|
|
(setq matches (calc-match-user-syntax rule))))
|
|
|
|
|
(let ((args (progn
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
calc-arg-values))
|
|
|
|
|
(conds nil)
|
|
|
|
|
temp)
|
|
|
|
|
(if x
|
|
|
|
|
(setq matches (cons x matches)))
|
|
|
|
|
(setq match (cdr (car p)))
|
|
|
|
|
(while (and (eq (car-safe match)
|
|
|
|
|
'calcFunc-condition)
|
|
|
|
|
(= (length match) 3))
|
|
|
|
|
(setq conds (append (math-flatten-lands
|
|
|
|
|
(nth 2 match))
|
|
|
|
|
conds)
|
|
|
|
|
match (nth 1 match)))
|
|
|
|
|
(while (and conds match)
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cond ((eq (car-safe (car conds))
|
|
|
|
|
'calcFunc-let)
|
|
|
|
|
(setq temp (car conds))
|
|
|
|
|
(or (= (length temp) 3)
|
|
|
|
|
(and (= (length temp) 2)
|
|
|
|
|
(eq (car-safe (nth 1 temp))
|
|
|
|
|
'calcFunc-assign)
|
|
|
|
|
(= (length (nth 1 temp)) 3)
|
|
|
|
|
(setq temp (nth 1 temp)))
|
|
|
|
|
(setq match nil))
|
|
|
|
|
(setq matches (cons
|
|
|
|
|
(math-normalize
|
|
|
|
|
(math-multi-subst
|
|
|
|
|
(nth 2 temp)
|
|
|
|
|
args matches))
|
|
|
|
|
matches)
|
|
|
|
|
args (cons (nth 1 temp)
|
|
|
|
|
args)))
|
|
|
|
|
((and (eq (car-safe (car conds))
|
|
|
|
|
'calcFunc-matches)
|
|
|
|
|
(= (length (car conds)) 3))
|
|
|
|
|
(setq temp (calcFunc-vmatches
|
|
|
|
|
(math-multi-subst
|
|
|
|
|
(nth 1 (car conds))
|
|
|
|
|
args matches)
|
|
|
|
|
(nth 2 (car conds))))
|
|
|
|
|
(if (eq temp 0)
|
|
|
|
|
(setq match nil)
|
|
|
|
|
(while (setq temp (cdr temp))
|
|
|
|
|
(setq matches (cons (nth 2 (car temp))
|
|
|
|
|
matches)
|
|
|
|
|
args (cons (nth 1 (car temp))
|
|
|
|
|
args)))))
|
|
|
|
|
(t
|
|
|
|
|
(or (math-is-true (math-simplify
|
|
|
|
|
(math-multi-subst
|
|
|
|
|
(car conds)
|
|
|
|
|
args matches)))
|
|
|
|
|
(setq match nil))))
|
|
|
|
|
(setq conds (cdr conds)))
|
|
|
|
|
(if match
|
|
|
|
|
(not (setq match (math-multi-subst
|
|
|
|
|
match args matches)))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-old-pos save-exp-old-pos
|
|
|
|
|
math-exp-token save-exp-token
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data save-exp-data
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
math-exp-pos save-exp-pos)))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq p (cdr p)))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(and p match)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun calc-match-user-syntax (p &optional term)
|
|
|
|
|
(let ((matches nil)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(save-exp-pos math-exp-pos)
|
|
|
|
|
(save-exp-old-pos math-exp-old-pos)
|
|
|
|
|
(save-exp-token math-exp-token)
|
|
|
|
|
(save-exp-data math-expr-data)
|
|
|
|
|
m)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(while (and p
|
|
|
|
|
(cond ((stringp (car p))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(and (equal math-expr-data (car p))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(math-read-token)
|
|
|
|
|
t)))
|
|
|
|
|
((integerp (car p))
|
|
|
|
|
(and (setq m (catch 'syntax
|
|
|
|
|
(math-read-expr-level
|
|
|
|
|
(car p)
|
|
|
|
|
(if (cdr p)
|
|
|
|
|
(if (consp (nth 1 p))
|
|
|
|
|
(car (nth 1 (nth 1 p)))
|
|
|
|
|
(nth 1 p))
|
|
|
|
|
term))))
|
|
|
|
|
(not (stringp m))
|
|
|
|
|
(setq matches (nconc matches (list m)))))
|
|
|
|
|
((eq (car (car p)) '\?)
|
|
|
|
|
(setq m (calc-match-user-syntax (nth 1 (car p))))
|
|
|
|
|
(or (nth 2 (car p))
|
|
|
|
|
(setq matches
|
|
|
|
|
(nconc matches
|
|
|
|
|
(list
|
|
|
|
|
(cons 'vec (and (listp m) m))))))
|
|
|
|
|
(or (listp m) (not (nth 2 (car p)))
|
|
|
|
|
(not (eq (aref (car (nth 2 (car p))) 0) ?\$))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(eq math-exp-token 'end)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(t
|
|
|
|
|
(setq m (calc-match-user-syntax (nth 1 (car p))
|
|
|
|
|
(car (nth 2 (car p)))))
|
|
|
|
|
(if (listp m)
|
|
|
|
|
(let ((vec (cons 'vec m))
|
|
|
|
|
opos mm)
|
|
|
|
|
(while (and (listp
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq opos math-exp-pos
|
2001-11-06 18:59:06 +00:00
|
|
|
|
mm (calc-match-user-syntax
|
|
|
|
|
(or (nth 2 (car p))
|
|
|
|
|
(nth 1 (car p)))
|
|
|
|
|
(car (nth 2 (car p))))))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(> math-exp-pos opos))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(setq vec (nconc vec mm)))
|
|
|
|
|
(setq matches (nconc matches (list vec))))
|
|
|
|
|
(and (eq (car (car p)) '*)
|
|
|
|
|
(setq matches (nconc matches (list '(vec)))))))))
|
|
|
|
|
(setq p (cdr p)))
|
|
|
|
|
(if p
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-pos save-exp-pos
|
|
|
|
|
math-exp-old-pos save-exp-old-pos
|
|
|
|
|
math-exp-token save-exp-token
|
2004-11-09 20:32:37 +00:00
|
|
|
|
math-expr-data save-exp-data
|
2001-11-06 18:59:06 +00:00
|
|
|
|
matches "Failed"))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
matches))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-remove-dashes (x)
|
|
|
|
|
(if (string-match "\\`\\(.*\\)-\\(.*\\)\\'" x)
|
|
|
|
|
(math-remove-dashes
|
|
|
|
|
(concat (math-match-substring x 1) "#" (math-match-substring x 2)))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
x))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(defun math-remove-percentsigns (x)
|
|
|
|
|
(if (string-match "\\`\\(.*\\)%\\(.*\\)\\'" x)
|
|
|
|
|
(math-remove-percentsigns
|
2007-12-27 17:35:59 +00:00
|
|
|
|
(concat (math-match-substring x 1) "o'o" (math-match-substring x 2)))
|
2007-12-26 17:32:13 +00:00
|
|
|
|
x))
|
|
|
|
|
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-restore-dashes (x)
|
|
|
|
|
(if (string-match "\\`\\(.*\\)[#_]\\(.*\\)\\'" x)
|
|
|
|
|
(math-restore-dashes
|
|
|
|
|
(concat (math-match-substring x 1) "-" (math-match-substring x 2)))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
x))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(defun math-restore-placeholders (x)
|
|
|
|
|
"Replace placeholders by the proper characters in the symbol x.
|
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
|
|
|
|
This includes `#' for `_' and `'' for `%'.
|
2007-12-26 17:32:13 +00:00
|
|
|
|
If the current Calc language does not use placeholders, return nil."
|
|
|
|
|
(if (or (memq calc-language calc-lang-allow-underscores)
|
|
|
|
|
(memq calc-language calc-lang-allow-percentsigns))
|
|
|
|
|
(let ((sx (symbol-name x)))
|
|
|
|
|
(when (memq calc-language calc-lang-allow-percentsigns)
|
|
|
|
|
(require 'calccomp)
|
|
|
|
|
(setq sx (math-to-percentsigns sx)))
|
|
|
|
|
(if (memq calc-language calc-lang-allow-underscores)
|
|
|
|
|
(setq sx (math-string-restore-underscores sx)))
|
|
|
|
|
(intern-soft sx))))
|
2007-12-12 04:55:20 +00:00
|
|
|
|
|
|
|
|
|
(defun math-string-restore-underscores (x)
|
|
|
|
|
"Replace pound signs by underscores in the string x."
|
|
|
|
|
(if (string-match "\\`\\(.*\\)#\\(.*\\)\\'" x)
|
|
|
|
|
(math-string-restore-underscores
|
|
|
|
|
(concat (math-match-substring x 1) "_" (math-match-substring x 2)))
|
|
|
|
|
x))
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;;;###autoload
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(defun math-read-if (cond op)
|
|
|
|
|
(let ((then (math-read-expr-level 0)))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(or (equal math-expr-data ":")
|
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
|
|
|
|
(throw 'syntax "Expected `:'"))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(list 'calcFunc-if cond then (math-read-expr-level (nth 3 op)))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-factor-after ()
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(let ((math-exp-pos math-exp-pos)
|
|
|
|
|
math-exp-old-pos math-exp-token math-expr-data)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(or (memq math-exp-token '(number symbol dollar hash string))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(and (assoc math-expr-data '(("-") ("+") ("!") ("|") ("/")))
|
|
|
|
|
(assoc (concat "u" math-expr-data) math-expr-opers))
|
|
|
|
|
(eq (nth 2 (assoc math-expr-data math-expr-opers)) -1)
|
|
|
|
|
(assoc math-expr-data '(("(") ("[") ("{"))))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
|
|
|
|
(defun math-read-factor ()
|
2007-06-20 04:12:15 +00:00
|
|
|
|
(let ((math-expr-opers (math-expr-ops))
|
|
|
|
|
op)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(cond ((eq math-exp-token 'number)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(let ((num (math-read-number math-expr-data)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (not num)
|
|
|
|
|
(progn
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(setq math-exp-old-pos math-exp-pos)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(throw 'syntax "Bad format")))
|
|
|
|
|
(math-read-token)
|
|
|
|
|
(if (and math-read-expr-quotes
|
|
|
|
|
(consp num))
|
|
|
|
|
(list 'quote num)
|
|
|
|
|
num)))
|
|
|
|
|
((and calc-user-parse-table
|
|
|
|
|
(setq op (calc-check-user-syntax)))
|
|
|
|
|
op)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((or (equal math-expr-data "-")
|
|
|
|
|
(equal math-expr-data "+")
|
|
|
|
|
(equal math-expr-data "!")
|
|
|
|
|
(equal math-expr-data "|")
|
|
|
|
|
(equal math-expr-data "/"))
|
|
|
|
|
(setq math-expr-data (concat "u" math-expr-data))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-factor))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((and (setq op (assoc math-expr-data math-expr-opers))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(eq (nth 2 op) -1))
|
|
|
|
|
(if (consp (nth 1 op))
|
|
|
|
|
(funcall (car (nth 1 op)) op)
|
|
|
|
|
(math-read-token)
|
|
|
|
|
(let ((val (math-read-expr-level (nth 3 op))))
|
|
|
|
|
(cond ((eq (nth 1 op) 'ident)
|
|
|
|
|
val)
|
|
|
|
|
((and (Math-numberp val)
|
|
|
|
|
(equal (car op) "u-"))
|
|
|
|
|
(math-neg val))
|
|
|
|
|
(t (list (nth 1 op) val))))))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
((eq math-exp-token 'symbol)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(let ((sym (intern math-expr-data)))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(if (equal math-expr-data calc-function-open)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((f (assq sym math-expr-function-mapping)))
|
|
|
|
|
(math-read-token)
|
|
|
|
|
(if (consp (cdr f))
|
|
|
|
|
(funcall (car (cdr f)) f sym)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(let ((args (if (or (equal math-expr-data calc-function-close)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(eq math-exp-token 'end))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
nil
|
|
|
|
|
(math-read-expr-list))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(if (not (or (equal math-expr-data calc-function-close)
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(eq math-exp-token 'end)))
|
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
|
|
|
|
(throw 'syntax "Expected `)'"))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(if (and (memq calc-language
|
|
|
|
|
calc-lang-parens-are-subscripts)
|
2007-12-02 03:13:28 +00:00
|
|
|
|
args
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(let ((calc-matrix-mode 'scalar))
|
|
|
|
|
(math-known-matrixp
|
|
|
|
|
(list 'var sym
|
|
|
|
|
(intern
|
|
|
|
|
(concat "var-"
|
|
|
|
|
(symbol-name sym)))))))
|
|
|
|
|
(math-parse-fortran-subscr sym args)
|
|
|
|
|
(if f
|
|
|
|
|
(setq sym (cdr f))
|
|
|
|
|
(and (= (aref (symbol-name sym) 0) ?\\)
|
|
|
|
|
(< (prefix-numeric-value calc-language-option)
|
|
|
|
|
0)
|
|
|
|
|
(setq sym (intern (substring (symbol-name sym)
|
|
|
|
|
1))))
|
|
|
|
|
(or (string-match "-" (symbol-name sym))
|
|
|
|
|
(setq sym (intern
|
|
|
|
|
(concat "calcFunc-"
|
|
|
|
|
(symbol-name sym))))))
|
|
|
|
|
(cons sym args)))))
|
|
|
|
|
(if math-read-expr-quotes
|
|
|
|
|
sym
|
|
|
|
|
(let ((val (list 'var
|
|
|
|
|
(intern (math-remove-dashes
|
|
|
|
|
(symbol-name sym)))
|
|
|
|
|
(if (string-match "-" (symbol-name sym))
|
|
|
|
|
sym
|
|
|
|
|
(intern (concat "var-"
|
|
|
|
|
(symbol-name sym)))))))
|
2007-12-12 04:55:20 +00:00
|
|
|
|
(let ((v (or
|
|
|
|
|
(assq (nth 1 val) math-expr-variable-mapping)
|
2007-12-26 17:32:13 +00:00
|
|
|
|
(assq (math-restore-placeholders (nth 1 val))
|
2007-12-12 04:55:20 +00:00
|
|
|
|
math-expr-variable-mapping))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(and v (setq val (if (consp (cdr v))
|
|
|
|
|
(funcall (car (cdr v)) v val)
|
|
|
|
|
(list 'var
|
|
|
|
|
(intern
|
|
|
|
|
(substring (symbol-name (cdr v))
|
|
|
|
|
4))
|
|
|
|
|
(cdr v))))))
|
2010-06-22 00:41:10 -07:00
|
|
|
|
(while (and (memq calc-language
|
2007-12-02 03:13:28 +00:00
|
|
|
|
calc-lang-brackets-are-subscripts)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(equal math-expr-data "["))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
2007-12-02 03:13:28 +00:00
|
|
|
|
(let ((el (math-read-expr-list)))
|
|
|
|
|
(while el
|
|
|
|
|
(setq val (append (list 'calcFunc-subscr val)
|
|
|
|
|
(list (car el))))
|
|
|
|
|
(setq el (cdr el))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(if (equal math-expr-data "]")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
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
|
|
|
|
(throw 'syntax "Expected `]'")))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
val)))))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
((eq math-exp-token 'dollar)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(let ((abs (if (> math-expr-data 0) math-expr-data (- math-expr-data))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(if (>= (length calc-dollar-values) abs)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(let ((num math-expr-data))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
|
|
|
|
(setq calc-dollar-used (max calc-dollar-used num))
|
|
|
|
|
(math-check-complete (nth (1- abs) calc-dollar-values)))
|
|
|
|
|
(throw 'syntax (if calc-dollar-values
|
|
|
|
|
"Too many $'s"
|
|
|
|
|
"$'s not allowed in this context")))))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
((eq math-exp-token 'hash)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(or calc-hashes-used
|
|
|
|
|
(throw 'syntax "#'s not allowed in this context"))
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(if (<= math-expr-data (length calc-arg-values))
|
|
|
|
|
(let ((num math-expr-data))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
|
|
|
|
(setq calc-hashes-used (max calc-hashes-used num))
|
|
|
|
|
(nth (1- num) calc-arg-values))
|
|
|
|
|
(throw 'syntax "Too many # arguments")))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((equal math-expr-data "(")
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(let* ((exp (let ((math-exp-keep-spaces nil))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(if (or (equal math-expr-data "\\dots")
|
|
|
|
|
(equal math-expr-data "\\ldots"))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
'(neg (var inf var-inf))
|
|
|
|
|
(math-read-expr-level 0)))))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(let ((math-exp-keep-spaces nil))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(cond
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((equal math-expr-data ",")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(math-read-token)
|
|
|
|
|
(let ((exp2 (math-read-expr-level 0)))
|
|
|
|
|
(setq exp
|
|
|
|
|
(if (and exp2 (Math-realp exp) (Math-realp exp2))
|
|
|
|
|
(math-normalize (list 'cplx exp exp2))
|
|
|
|
|
(list '+ exp (list '* exp2 '(var i var-i))))))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((equal math-expr-data ";")
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(math-read-token)
|
|
|
|
|
(let ((exp2 (math-read-expr-level 0)))
|
|
|
|
|
(setq exp (if (and exp2 (Math-realp exp)
|
|
|
|
|
(Math-anglep exp2))
|
|
|
|
|
(math-normalize (list 'polar exp exp2))
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(list '* exp
|
|
|
|
|
(list 'calcFunc-exp
|
|
|
|
|
(list '*
|
|
|
|
|
(math-to-radians-2 exp2)
|
|
|
|
|
'(var i var-i)))))))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((or (equal math-expr-data "\\dots")
|
|
|
|
|
(equal math-expr-data "\\ldots"))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(progn
|
|
|
|
|
(math-read-token)
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(let ((exp2 (if (or (equal math-expr-data ")")
|
|
|
|
|
(equal math-expr-data "]")
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(eq math-exp-token 'end))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
'(var inf var-inf)
|
|
|
|
|
(math-read-expr-level 0))))
|
|
|
|
|
(setq exp
|
|
|
|
|
(list 'intv
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(if (equal math-expr-data ")") 0 1)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
exp
|
|
|
|
|
exp2)))))))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
(if (not (or (equal math-expr-data ")")
|
|
|
|
|
(and (equal math-expr-data "]") (eq (car-safe exp) 'intv))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
(eq math-exp-token 'end)))
|
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
|
|
|
|
(throw 'syntax "Expected `)'"))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-token)
|
|
|
|
|
exp))
|
(calc-do-quick-calc): Use kill-new to append string to kill-ring.
(calc-alg-exp, math-toks, math-exp-pos,math-exp-old-pos)
(math-exp-token, math-exp-keep-spaces, math-exp-str): New variables.
(calc-do-alg-entry, calcAlg-equals, calcAlg-edit, calcAlg-enter): Use
declared variable calc-alg-exp.
(math-build-parse-table, math-find-user-token): Use declared variable
math-toks.
(math-read-exprs, math-read-token, calc-check-user-syntax,
calc-match-user-syntax, match-factor-after, math-read-factor): Use
declared variables math-exp-pos math-exp-old-pos.
(math-read-exprs, math-read-token, math-read-expr-level)
(calc-check-user-syntax, calc-match-user-syntax, match-factor-after)
(math-read-factor): Use declared variable math-exp-token.
(math-read-exprs, math-read-expr-list, math-read-token,
math-read-factor): Use declared variable math-exp-keep-spaces.
(math-read-exprs, math-read-token): Use declared variable
math-exp-str.
(calc-match-user-syntax): Made m a local variable.
2004-11-11 05:48:50 +00:00
|
|
|
|
((eq math-exp-token 'string)
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-string))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((equal math-expr-data "[")
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-brackets t "]"))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((equal math-expr-data "{")
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-brackets nil "}"))
|
2004-11-09 20:32:37 +00:00
|
|
|
|
((equal math-expr-data "<")
|
2004-11-29 05:56:06 +00:00
|
|
|
|
(require 'calc-ext)
|
2001-11-06 18:59:06 +00:00
|
|
|
|
(math-read-angle-brackets))
|
2001-11-14 08:59:18 +00:00
|
|
|
|
(t (throw 'syntax "Expected a number")))))
|
2001-11-06 18:59:06 +00:00
|
|
|
|
|
2004-11-30 16:59:39 +00:00
|
|
|
|
(provide 'calc-aent)
|
|
|
|
|
|
2008-04-08 22:07:55 +00:00
|
|
|
|
;; Local variables:
|
|
|
|
|
;; generated-autoload-file: "calc-loaddefs.el"
|
|
|
|
|
;; End:
|
|
|
|
|
|
2001-11-14 08:59:18 +00:00
|
|
|
|
;;; calc-aent.el ends here
|