build-rpt.el byte-optimize.el bytecomp-runtime.el bytecomp.el \
callers-of-rpt.el cl-compat.el cl-extra.el cl-macs.el cl-seq.el \
cl.el cmdloop.el code-cmds.el code-files.el code-process.el \
- coding.el compat.el config.el console.el cus-dep.el \
- cus-edit.el cus-face.el cus-file.el cus-load.el cus-start.el \
- custom.el derived.el device.el dialog-items.el dialog.el \
- disass.el disp-table.el dragdrop.el easy-mmode.el easymenu.el \
- emod-utils.el etags.el events.el extents.el faces.el ffi.el \
- files-nomule.el files.el fill.el float-sup.el font-lock.el \
- font-menu.el font.el fontl-hooks.el format.el frame.el \
- glyphs.el gnuserv.el gpm.el gui.el gutter-items.el gutter.el \
- help-macro.el help-nomule.el help.el hyper-apropos.el indent.el \
- info.el isearch-mode.el iso8859-1.el issue-tracker.el \
+ coding.el compat.el config.el console.el const-aliases.el \
+ cus-dep.el cus-edit.el cus-face.el cus-file.el cus-load.el \
+ cus-start.el custom.el derived.el device.el dialog-items.el \
+ dialog.el disass.el disp-table.el dragdrop.el easy-mmode.el \
+ easymenu.el emod-utils.el etags.el events.el extents.el \
+ faces.el ffi.el files-nomule.el files.el fill.el float-sup.el \
+ font-lock.el font-menu.el font.el fontl-hooks.el format.el \
+ frame.el glyphs.el gnuserv.el gpm.el gui.el gutter-items.el \
+ gutter.el help-macro.el help-nomule.el help.el hyper-apropos.el \
+ indent.el info.el isearch-mode.el iso8859-1.el issue-tracker.el \
itimer-autosave.el itimer.el keydefs.el keymap.el ldap.el \
lib-complete.el lisp-initd.el lisp-mnt.el lisp-mode.el lisp.el \
list-mode.el loaddefs.el loadhist.el map-ynp.el \
--- /dev/null
+;;; const-aliases --- define alias for C defconsts to allow let-bind
+
+;; Copyright (C) 2015 Nelson Ferreira
+
+;; Author: Nelson Ferreira <nelson.ferreira@ieee.org>
+;; Maintainer: SXEmacs Development Team
+;; Keywords: internal
+
+;; This file is part of SXEmacs.
+
+;; SXEmacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; SXEmacs is distributed in the hope that it will be useful,
+;; 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
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; The following code is required at startup to define all the
+;; necessary defconst alias for C DEFVAR_CONST that we wish to
+;; allow let-bind to succeed.
+
+\f
+;;; Code:
+
+(when (featurep 'bigfr)
+ (defconst pi bigfr-pi "The value of Pi (3.1415926...)")
+ (defconst e euler "The value of e (2.7182818...)"))
+
+(provide 'const-aliases)
+
;;; Load user's init file and default ones.
(defun load-init-file ()
+
+ (require 'const-aliases)
+
(run-hooks 'before-init-hook)
;; Run the site-start library if it exists. The point of this file is
\f
Lisp_Object Veuler;
Lisp_Object Veuler_mascheroni;
-Lisp_Object Vpi;
+Lisp_Object Vbigfr_pi;
bigfr ent_scratch_bigfr;
static ase_nullary_operation_f Qent_mpfr_zero, Qent_mpfr_one;
Veuler_mascheroni = make_bigfr(0.0, 2048UL);
mpfr_const_euler(XBIGFR_DATA(Veuler_mascheroni), GMP_RNDN);
- Vpi = make_bigfr(0.0, 2048UL);
- mpfr_const_pi(XBIGFR_DATA(Vpi), GMP_RNDN);
+ Vbigfr_pi = make_bigfr(0.0, 2048UL);
+ mpfr_const_pi(XBIGFR_DATA(Vbigfr_pi), GMP_RNDN);
}
void syms_of_ent_mpfr(void)
/* just some dummy values atm, to make the dumper smile */
Veuler = make_int(1L);
Veuler_mascheroni = make_int(1L);
- Vpi = make_int(1L);
+ Vbigfr_pi = make_int(1L);
DEFVAR_CONST_LISP("euler", &Veuler /*
The value of Euler's constant e (2.7182818...).
DEFVAR_CONST_LISP("euler-mascheroni", &Veuler_mascheroni /*
The value of the Euler-Mascheroni constant (0.5772156...).
*/);
- /*
- * See http://issues.sxemacs.org/show_bug.cgi?id=176 for why this
- * is no longer a constant. -SY.
- */
- DEFVAR_LISP("pi", &Vpi /*
+ DEFVAR_CONST_LISP("bigfr-pi", &Vbigfr_pi /*
The value of pi (3.1415926...).
*/);
extern Lisp_Object Veuler;
extern Lisp_Object Veuler_mascheroni;
-extern Lisp_Object Vpi;
+extern Lisp_Object Vbigfr_pi;
\f
typedef struct Lisp_Bigfr Lisp_Bigfr;