Stefan Monnier
f342b7c969
* lisp/calc/: Use lexical scoping in all the files
...
Includes the following pervasive changes:
- Move some defvars earlier in the file so they cover earlier let-bindings
- Change dynamically scoped `calc-FOO` or `math-FOO` function arguments
to just FOO and then let-bind the `calc-FOO` or `math-FOO` variable
explicitly in the body of the function. In some cases, the
beginning of the function was changed to refer to FOO so as to delay
the binding to a nearby `let` when I could ensure that it did
not make a difference.
- Add an underscore in front of unused vars or comment them out altogether.
- Replace unused `err` arg to `condition-case` with nil.
Plus the additional itemized changes below.
* lisp/calc/calc-map.el (calcFunc-reducer):
* lisp/calc/calc-arith.el (math-setup-declarations):
* lisp/calc/calc-help.el (calc-full-help, calc-help-index-entries)
(calc-full-help): Use `ignore-errors`.
* lisp/calc/calc-embed.el (calc-embedded-modes-change):
Declare `the-language` and `the-display-just` as dynamically scoped.
* lisp/calc/calc-forms.el (math-setup-year-holidays): Use `dolist`.
* lisp/calc/calc-graph.el (calc-graph-set-styles): Use `symbol-value`
rather than `eval.`
(calc-graph-delete-temps, calc-graph-set-styles): Use ignore-errors.
* lisp/calc/calc-macs.el (calc-with-trail-buffer): Add artificial use
of `save-buf` to silence compiler warnings in all the cases where
`body` doesn't make use of it.
* lisp/calc/calc-math.el (math-largest-emacs-expt)
(math-smallest-emacs-expt, math-use-emacs-fn): Use ignore-errors.
* lisp/calc/calc-mode.el (calc-total-algebraic-mode): Remove "P" from
interactive spec since it's not used anyway.
* lisp/calc/calc-rewr.el (calc-match): Simplify.
* lisp/calc/calc.el (calc-buffer): Give it a global nil value,
so it's automatically declared dynbound in any file that requires `calc`.
(calcDigit-nondigit): Adjust accordingly.
* lisp/calc/calcalg2.el (calcFunc-table): Declare `var-dummy` as dynbound.
(math-scan-for-limits): Comment out dead code.
* lisp/calc/calcalg3.el (math-general-fit): Declare `var-YVAL` and
`var-YVALX` as dynbound.
2020-10-10 16:00:51 -04:00
Paul Eggert
365e01cc9f
Update copyright year to 2020
...
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Mattias Engdegård
19405291aa
Fix linear equation system solving in Calc (bug#35374)
...
* lisp/calc/calcalg2.el (math-try-solve-for):
To solve Ax^n=0 where A is a nonzero constant and x the variable to
solve for, solve x^n=0 instead of solving A=0 (which obviously fails)
or something equally stupid.
* test/lisp/calc/calc-tests.el (calc-test-solve-linear-system): New.
2019-09-29 13:41:21 +02:00
Paul Eggert
26bed8ba10
Update copyright year to 2019
...
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Paul Eggert
5c7dd8a783
Update copyright year to 2018
...
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Glenn Morris
383abc8898
; Fix some comment typos
2017-11-03 15:18:32 -04:00
Paul Eggert
bc511a64f6
Prefer HTTPS to FTP and HTTP in documentation
...
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
5badc81c1c
Update copyright year to 2017
...
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Paul Eggert
0e963201d0
Update copyright year to 2016
...
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Jay Belanger
fb711d7275
Change maintainer address.
...
* lisp/calc/calc (calc-bug-address): Change address.
2015-11-03 16:16:54 -06:00
Paul Eggert
7e09ef09a4
Update copyright year to 2015
...
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Paul Eggert
ba3189039a
Update copyright year to 2014 by running admin/update-copyright.
2014-01-01 07:43:34 +00:00
Jay Belanger
7a91562ff0
* calc/calc-ext.el (math-to-radians-2, math-from-radians-2):
...
Add option to force `pi' to remain symbolic.
* calc/calcalg2.el (calcFunc-sin, calcFunc-cos, calcFunc-tan)
(calcFunc-cot, calcFunc-csc, calcFunc-sec, calcFunc-arcsin)
(calcFunc-arccos, calcFunc-arctan): Use symbolic `pi' in the
derivatives, when necessary.
2013-02-23 19:05:13 -06:00
Paul Eggert
ab422c4d68
Update copyright notices for 2013.
2013-01-01 09:11:05 +00:00
Andreas Schwab
651eaf36f2
* calc/calc-prog.el (math-do-defmath): Use backquote forms. Fix
...
handling of interactive spec when the body uses return.
(math-do-arg-check, math-define-function-body): Use backquote forms.
* calc/calc-ext.el (math-defcache): Likewise.
* calc/calc-rewr.el (math-rwfail, math-rweval): Likewise.
* allout.el (allout-new-exposure): Likewise.
* calc/calcalg2.el (math-tracing-integral): Likewise.
* info.el (Info-last-menu-item): Likewise.
* emulation/vip.el (vip-loop): Likewise.
* textmodes/artist.el (artist-funcall): Likewise.
* menu-bar.el (menu-bar-make-mm-toggle, menu-bar-make-toggle):
Construct menu-item directly.
* cedet/ede/base.el (ede-with-projectfile): Use backquote forms.
2012-08-07 18:12:20 +02:00
Glenn Morris
acaf905b11
Add 2012 to FSF copyright years for Emacs files
2012-01-05 01:46:05 -08:00
Glenn Morris
73b0cd5003
Convert consecutive FSF copyright years to ranges.
2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0
Nuke arch-tags.
2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054
Merge from emacs-23
2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3
Add 2011 to FSF/AIST copyright years.
2011-01-02 15:50:46 -08:00
Jay Belanger
a974dcf2bb
calc-alg.el (math-var): Renamed from `var'.
...
(math-is-polynomial, math-is-poly-rec): Replace `var' with `math-var'.
calcalg2.el (math-var): Renamed from `var'.
(calcFunc-table, math-scan-for-limits): Replace `var' with `math-var'.
2010-10-13 22:14:38 -05:00
Chong Yidong
de3a1fe935
Fix more save-excursion warnings.
...
* textmodes/reftex-toc.el (reftex-toc-promote-prepare):
* emacs-lisp/elint.el (elint-add-required-env):
* cedet/semantic/db-find.el (semanticdb-find-translate-path-brutish-default):
* cedet/ede/make.el (ede-make-check-version):
* calendar/icalendar.el (icalendar--add-diary-entry):
* calc/calcalg2.el (math-tracing-integral): Use with-current-buffer instead of save-excursion.
2010-02-27 20:22:44 -05:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Glenn Morris
f3445fab9f
(var): Define for compiler.
...
Delete trailing whitespace.
2009-09-19 21:11:40 +00:00
Glenn Morris
ae940284fa
Add 2009 to copyright years.
2009-01-05 03:18:22 +00:00
Glenn Morris
662c9c64ae
Switch to recommended form of GPLv3 permissions notice.
2008-05-06 03:16:00 +00:00
Stefan Monnier
cbee283dd7
Fix up comment convention on the arch-tag lines.
2008-04-10 14:10:46 +00:00
Miles Bader
59ce725a3b
Merge from emacs--rel--22
...
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
8b72699e88
Add 2008 to copyright years.
2008-01-07 01:14:52 +00:00
David Kastrup
274f1353e0
* erc-stamp.el (erc-echo-timestamp):
...
* erc-lang.el (language):
* erc-backend.el (erc-server-connect): Fix buggy call to `message'.
* gnus-sum.el (gnus-summary-simplify-subject-query):
* ecomplete.el (ecomplete-display-matches): Fix buggy call to
`message'.
* textmodes/reftex.el (reftex-select-with-char):
* textmodes/reftex-toc.el (reftex-toc-do-promote)
(reftex-toc-visit-location, reftex-toc-find-section):
* textmodes/reftex-index.el (reftex-index-show-entry):
* textmodes/org.el (org-cycle-hide-archived-subtrees)
(org-table-rotate-recalc-marks, org-mark-ring-push)
(org-follow-info-link, org-mhe-get-message-folder-from-index)
(org-auto-repeat-maybe, org-store-log-note, org-delete-property)
(org-evaluate-time-range, org-edit-agenda-file-list):
* textmodes/artist.el (artist-select-next-op-in-list)
(artist-select-prev-op-in-list):
* term/mac-win.el (mac-service-insert-text):
* startup.el (fancy-about-screen):
* progmodes/vhdl-mode.el (vhdl-decision-query):
* progmodes/idlwave.el (idlwave-template)
(idlwave-scroll-completions, idlwave-display-completion-list):
* progmodes/ebrowse.el (ebrowse-show-progress):
* progmodes/cperl-mode.el (cperl-find-pods-heres):
* progmodes/antlr-mode.el (antlr-insert-option-do):
* play/mpuz.el (mpuz-close-game):
* net/rcirc.el (rcirc-next-active-buffer):
* mail/reporter.el (reporter-update-status):
* kmacro.el (kmacro-display):
* international/ja-dic-cnv.el (skkdic-set-okuri-nasi):
* emulation/viper-util.el (viper-save-setting):
* emacs-lisp/lisp-mnt.el (lm-verify):
* emacs-lisp/edebug.el (edebug-set-mode):
* emacs-lisp/checkdoc.el (checkdoc-rogue-spaces, checkdoc-defun):
* calendar/calendar.el (calendar-print-day-of-year):
* calc/calcalg3.el (calc-curve-fit):
* calc/calcalg2.el (math-integral):
* calc/calc.el (calc-read-key-sequence, calc-version):
* calc/calc-mode.el (calc-set-simplify-mode):
* calc/calc-ext.el (calc-fancy-prefix): Fix buggy call to
`message'.
2007-12-08 01:02:29 +00:00
Glenn Morris
075969b476
Switch license to GPLv3 or later.
2007-07-25 03:51:22 +00:00
Jay Belanger
e8fff8ed68
Update maintainer's address.
2007-04-23 21:30:42 +00:00
Glenn Morris
7c671b23f3
Change form of license text to match rest of Emacs.
2007-03-19 20:59:53 +00:00
Glenn Morris
f0fa15c5e5
Add 2007 to copyright years.
2007-01-21 02:48:43 +00:00
Jay Belanger
63f7edace7
(math-integrate-by-parts): Do a more careful test to see if equation
...
can be solved.
2006-02-14 21:39:26 +00:00
Jay Belanger
09ea57eaca
Update copyright year.
2006-02-05 16:31:42 +00:00
Jay Belanger
a6c72dc393
(calc-sum-rec): Fix the case where the lower limit is 0.
2006-01-21 04:31:11 +00:00
Jay Belanger
b682966a61
(calc-integral): With an argument, compute the definite integral.
2005-10-11 19:41:48 +00:00
Jay Belanger
58ba2f8f07
Update copyright information.
2005-07-14 20:05:30 +00:00
Jay Belanger
9d871e6da5
(math-decls-cache, math-decls-all): Declare them.
2005-05-28 04:39:45 +00:00
Jay Belanger
a42e94cac5
Update copyright year.
2005-05-07 21:22:51 +00:00
Jay Belanger
bba984aa3d
(calc-solve-for): Use "Variable(s)" to prompt for variables.
2005-03-25 21:28:15 +00:00
Jay Belanger
dbf954fbbf
Add differentiation rule for calcFunc-coth.
...
Adjust differentiation rules for calcFunc-tan, calcFunc-cot,
calcFunc-tanh.
Adjust integration rule for calcFunc-tan.
2005-02-19 20:02:43 +00:00
Jay Belanger
9274224b86
Add derivative and integration rules for calcFunc-sec, calcFunc-csc,
...
calcFunc-cot, calcFunc-sech, calcFunc-csch, calcFunc-coth.
(math-do-integral-methods): Add to checks for when to use
substitutions.
2005-02-15 19:27:47 +00:00
Jay Belanger
59f2c6c09b
Add a provide statement.
...
(calc-Need-calc-alg-2): Remove it.
2004-11-30 17:30:34 +00:00
Jay Belanger
79d2746f47
(math-expr-parts, math-try-solve-sign, math-solve-b, math-int-factors)
...
(math-double-roots): Declare them (for real this time).
2004-11-27 04:13:08 +00:00
Jay Belanger
f7adda5411
(math-integrate-by-parts): Removed unused variable var-thing.
...
(math-integ-depth, math-integ-level, math-integral-limit)
(math-enable-subst, math-any-substs, math-integ-msg)
(math-prev-parts-v, math-good-parts, math-max-integral-limit)
(math-int-threshold, math-int-factors, math-double-roots)
(math-solve-simplifying, var-IntegLimit, math-solve-sign)
(var-GenCount): Declared these variables.
(calcFunc-integ): Don't check if var-IntegLimit is bound.
(math-integral-cache, math-integral-cache-state): Move declarations
to earlier in the file.
(math-deriv-var, math-deriv-total, math-deriv-symb): New variables.
(math-derivative, calcFunc-deriv, calcFunc-tderiv): Replace
variables deriv-var, deriv-total and deriv-symb by declared variables
math-deriv-var, math-deriv-total and math-deriv-symb.
(math-cur-record): New variable.
(math-integral, math-replace-integral-parts, math-integrate-by-parts)
(calc-dump-integral-cache, math-try-integral): Replace variable
cur-record by declared variable math-cur-record.
(math-has-rules): New variable.
(math-try-integral, math-do-integral): Use declared variable
math-has-rules instead of has-rules.
(math-t1, math-t2, math-t3): New variables.
(math-do-integral, math-do-integral-methods, math-try-solve-for)
(math-try-solve-prod, math-solve-poly-funny-powers)
(math-solve-crunch-poly, math-decompose-poly)
(math-solve-find-root-term, math-find-root-in-prod): Replace
variables t1, t2, t3 by declared variables math-t1, math-t2,
math-t3.
(math-so-far, math-integ-expr): New variables.
(math-do-integral-methods, math-integ-try-linear-substitutions)
(math-integ-try-substitutions): Replace variables so-far and expr by
declared variables math-so-far and math-integ-expr.
(math-expr-parts): New variable.
(math-expr-rational-in, math-expr-rational-in-rec): Replace variable
parts by declared variable math-expr-parts.
(calc-low, calc-high): New variables.
(calcFunc-table, math-scan-for-limits): Replaced variable low and
high with the declared variable calc-low and calc-high.
(math-solve-var, math-solve-full): New variables.
(math-try-solve-for, math-try-solve-prod, math-solve-prod)
(math-decompose-poly, math-solve-quartic, math-poly-all-roots)
(math-solve-find-root-in-prod, math-solve-for, math-solve-system)
(math-solve-system-rec, math-solve-get-sign, math-solve-get-int):
Replace variables solve-var and solve-full with declared variables
math-solve-var and math-solve-full.
(math-solve-vars): New variable.
(math-solve-system, math-solve-system-rec): Replace variable
solve-vars with declared variable math-solve-vars.
(math-try-solve-sign): New variable.
(math-try-solve-for, math-try-solve-prod): Replace variable
sign by declared variable math-try-solve-sign.
(math-solve-b): New variable.
(math-solve-poly-funny-powers, math-decompose-poly): Replace variable
b by declared variable math-solve-b.
(math-solve-system-vv, math-solve-res): New variables
(math-solve-system-rec, math-solve-system-subst): Replaced variables
vv and res with declared variables math-solve-system-vv and
math-solve-system-res.
2004-11-15 06:16:21 +00:00
Jay Belanger
f1e0e03c67
(math-do-integral-methods): Try linear, then non-linear, substitutions.
2004-11-08 02:21:11 +00:00
Jay Belanger
4710da05cb
(math-linear-subst-tried): New variable.
...
(math-do-integral): Set `math-linear-subst-tried' to nil.
(math-do-integral-methods): Use `math-linear-subst-tried' to
determine what type of substitution to try.
(math-integ-try-linear-substituion): Set `math-linear-subst-tried' to
t.
2004-11-07 23:33:29 +00:00
Miles Bader
ab5796a9f9
Add arch taglines
2003-09-01 15:45:59 +00:00