[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: 白い熊
Subject: Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs
Date: Mon, 29 Jul 2013 15:21:04 +0400
User-agent: K-9 Mail for Android

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]