Define `pi' in elisp, even with bigfr. (Closes bug #176)
authorSteve Youngs <steve@sxemacs.org>
Mon, 21 Dec 2015 23:35:21 +0000 (09:35 +1000)
committerSteve Youngs <steve@sxemacs.org>
Mon, 21 Dec 2015 23:35:21 +0000 (09:35 +1000)
commit73dac82e98e87f568519ac37d591661063db3f54
tree2639415af0bf1fdfd81a8cd26b238a51a58e8790
parent9c176f58aa755c41e57153bf0ff69a5fbe0e3f8e
Define `pi' in elisp, even with bigfr. (Closes bug #176)

An elisp constant defined with #'defconst can be let-bound, or otherwise
altered.  But one that is defined in C cannot be.  SXEmacs' pi is
sometimes defined in elisp, and sometimes in C, depending on whether it
has bigfr or not.  The Calc XEmacs package let-binds pi in a couple of
places, resulting in errors when (featurep 'bigfr) => t.

With this change, pi is defined in elisp regardless of bigfr.  But it will
still use bigfr to obtain the value if it is available.

* lisp/float-sup.el: Define pi in elisp, even if we have bigfr,
and in that case set it to what mpfr gives us.
Same for e.

* src/ent/ent-mpfr.c (init_ent_mpfr): Vpi -> Vbigfr_pi
(vars_of_ent_mpfr): Vpi -> Vbigfr_pi, pi -> bigfr-pi

* src/ent/ent-mpfr.h: Vpi -> Vbigfr_pi

Signed-off-by: Steve Youngs <steve@sxemacs.org>
lisp/float-sup.el
src/ent/ent-mpfr.c
src/ent/ent-mpfr.h