1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 18:40:22 +02:00
guile/module/language/elisp/runtime.scm
Daniel Kraft 1e018f6c67 Some bug fixes on the way and mainly implemented some built-ins (arithmetic).
* module/language/elisp/README: Document changes.
* module/language/elisp/compile-tree-il.scm: Bug fixes to fluid-creation.
* module/language/elisp/runtime.scm: Some helping definitions for built-ins.
* module/language/elisp/runtime/function-slot.scm: Defined artihmetic built-ins.
2009-07-13 18:35:57 +02:00

54 lines
1.4 KiB
Scheme

;;; Guile Emac Lisp
;; Copyright (C) 2001 Free Software Foundation, Inc.
;; This program 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 2, or (at your option)
;; any later version.
;;
;; This program 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; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Code:
(define-module (language elisp runtime)
#:export (void nil-value t-value elisp-bool)
#:export-syntax (built-in-func))
; This module provides runtime support for the Elisp front-end.
; The reserved value to mean (when eq?) void.
(define void (list 42))
; Values for t and nil.
; FIXME: Use real nil.
(define nil-value #f)
(define t-value #t)
; Convert a scheme boolean to Elisp.
(define (elisp-bool b)
(if b
t-value
nil-value))
; Define a predefined function; convenient macro for this task.
(define-macro (built-in-func name value)
`(begin
(define-public ,name (make-fluid))
(fluid-set! ,name ,value)))