[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining programatically whether the interpreter is Guile or Clis

From: Nala Ginrut
Subject: Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs
Date: Mon, 29 Jul 2013 19:32:25 +0800

I think the most efficient way is to use 'cpp' of gcc to do the pre-processer, or you have to try eval-when, please read the manual for it.

在 2013-7-29 PM7:23,"白い熊" <address@hidden>写道:
Nala Ginrut <address@hidden> wrote:

>> I would like to program for Guile as the lowest denominator.
>> What is the proper check I should define that would tell me whether
>I'm currently interpreting the code in Guile,  or Emacs,  or Crisp.
>If you just want to check whether a symbol was defined, try:
>(module-defined? (current-module) 'function-lambda-_expression_)


Thanks for the tip.

What I'm trying to do:  I have a host of kx-...  functions which I want to call from any interpreter with the same syntax,  i.e.  let's say for instance (kx-file-open "funny-file.txt")

Now,  within the kx-file-open I need to find out whether I'm in guile or clisp or emacs, via a function call, let's say kx-interpreter.

This function should return let's say 0 for guile, 1 for clisp and 2 for emacs. Based on this, the file open function will use the appropriate lisp syntax for opening the file.

Now I'm wondering what the most effective / fastest way is to find out not whether a symbol is defined, but basically the answer to the self-awareness question: am I in guile, or am I in emacs...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]