aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2008-03-20 03:08:51 +0000
committerJay Belanger2008-03-20 03:08:51 +0000
commit01633b01c6ffaf5912f5b40922d5bd43b5bde7f4 (patch)
tree6e2d785f843b6f480e98dc4951e6cb36d3e8adbb
parentc56e37dd67164067ced5e7868a4865633f992223 (diff)
downloademacs-01633b01c6ffaf5912f5b40922d5bd43b5bde7f4.tar.gz
emacs-01633b01c6ffaf5912f5b40922d5bd43b5bde7f4.zip
Remove outdated comments.
(defcalcmodevar, calc-mode-var-list-restore-default-values) (calc-mode-var-list-restore-saved-values, calc-autorange-units): Add docstrings.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/calc/calc.el68
2 files changed, 14 insertions, 61 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b4999f14f54..6cf03d8c642 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12008-03-20 Jay Belanger <jay.p.belanger@gmail.com>
2
3 * calc/calc.el: Remove outdated comments.
4 (defcalcmodevar, calc-mode-var-list-restore-default-values)
5 (calc-mode-var-list-restore-saved-values, calc-autorange-units):
6 Add docstrings.
7
12008-03-19 Jason Rumney <jasonr@gnu.org> 82008-03-19 Jason Rumney <jasonr@gnu.org>
2 9
3 * w32-fns.el (x-alternatives-map): Add S-tab mapping. 10 * w32-fns.el (x-alternatives-map): Add S-tab mapping.
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index d14f667d752..6c4c0059212 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -142,66 +142,6 @@
142;; Note: Probably a good idea to call math-simplify-extended before 142;; Note: Probably a good idea to call math-simplify-extended before
143;; measuring a formula's simplicity. 143;; measuring a formula's simplicity.
144 144
145;; From: "Robert J. Chassell" <bob@rattlesnake.com>
146;; Subject: Re: fix for `Cannot open load file: calc-alg-3'
147;; To: walters@debian.org
148;; Date: Sat, 24 Nov 2001 21:44:21 +0000 (UTC)
149;;
150;; Could you add logistic curve fitting to the current list?
151;;
152;; (I guess the key binding for a logistic curve would have to be `s'
153;; since a logistic curve is an `s' curve; both `l' and `L' are already
154;; taken for logarithms.)
155;;
156;; Here is the current list for curve fitting;
157;;
158;; `1'
159;; Linear or multilinear. a + b x + c y + d z.
160;;
161;; `2-9'
162;; Polynomials. a + b x + c x^2 + d x^3.
163;;
164;; `e'
165;; Exponential. a exp(b x) exp(c y).
166;;
167;; `E'
168;; Base-10 exponential. a 10^(b x) 10^(c y).
169;;
170;; `x'
171;; Exponential (alternate notation). exp(a + b x + c y).
172;;
173;; `X'
174;; Base-10 exponential (alternate). 10^(a + b x + c y).
175;;
176;; `l'
177;; Logarithmic. a + b ln(x) + c ln(y).
178;;
179;; `L'
180;; Base-10 logarithmic. a + b log10(x) + c log10(y).
181;;
182;; `^'
183;; General exponential. a b^x c^y.
184;;
185;; `p'
186;; Power law. a x^b y^c.
187;;
188;; `q'
189;; Quadratic. a + b (x-c)^2 + d (x-e)^2.
190;;
191;; `g'
192;; Gaussian. (a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2).
193;;
194;;
195;; Logistic curves are used a great deal in ecology, and in predicting
196;; human actions, such as use of different kinds of energy in a country
197;; (wood, coal, oil, natural gas, etc.) or the number of scientific
198;; papers a person publishes, or the number of movies made.
199;;
200;; (The less information on which to base the curve, the higher the error
201;; rate. Theodore Modis ran some Monte Carlo simulations and produced
202;; what may be useful set of confidence levels for different amounts of
203;; initial information.)
204
205;;; Code: 145;;; Code:
206 146
207(require 'calc-macs) 147(require 'calc-macs)
@@ -524,15 +464,20 @@ scientific notation in calc-mode.")
524 "List of variables used in customizing GNU Calc.") 464 "List of variables used in customizing GNU Calc.")
525 465
526(defmacro defcalcmodevar (var defval &optional doc) 466(defmacro defcalcmodevar (var defval &optional doc)
467 "Declare VAR as a Calc variable, with default value DEFVAL
468and doc-string DOC.
469The variable VAR will be added to `calc-mode-var-list'."
527 `(progn 470 `(progn
528 (defvar ,var ,defval ,doc) 471 (defvar ,var ,defval ,doc)
529 (add-to-list 'calc-mode-var-list (list (quote ,var) ,defval)))) 472 (add-to-list 'calc-mode-var-list (list (quote ,var) ,defval))))
530 473
531(defun calc-mode-var-list-restore-default-values () 474(defun calc-mode-var-list-restore-default-values ()
475 "Restore the default values of the variables in `calc-mode-var-list'."
532 (mapcar (function (lambda (v) (set (car v) (nth 1 v)))) 476 (mapcar (function (lambda (v) (set (car v) (nth 1 v))))
533 calc-mode-var-list)) 477 calc-mode-var-list))
534 478
535(defun calc-mode-var-list-restore-saved-values () 479(defun calc-mode-var-list-restore-saved-values ()
480 "Restore the user-saved values of the variables in `calc-mode-var-list'."
536 (let ((newvarlist '())) 481 (let ((newvarlist '()))
537 (save-excursion 482 (save-excursion
538 (let (pos 483 (let (pos
@@ -790,7 +735,8 @@ If nil, selections displayed but ignored.")
790 "j<, h:mm:SS>" 735 "j<, h:mm:SS>"
791 "YYddd< hh:mm:ss>")) 736 "YYddd< hh:mm:ss>"))
792 737
793(defcalcmodevar calc-autorange-units nil) 738(defcalcmodevar calc-autorange-units nil
739 "If non-nil, automatically set unit prefixes to keep units in a reasonable range.")
794 740
795(defcalcmodevar calc-was-keypad-mode nil) 741(defcalcmodevar calc-was-keypad-mode nil)
796 742