guile-user
[Top][All Lists]
Advanced

[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 16:36:25 +0800

On Mon, 2013-07-29 at 10:21 +0200, 白い熊 wrote:
> Hello: 
> 
> I'm developping a program which I'd like to be able to use without 
> modification with Guile as the interpreter as well as Emacs lisp and clisp. 
> 

Hi! Welcome to Guile!

> So far,  I was only programming for Emacs/Clisp, for this I used a rather 
> crude check of: 
> 
>   (defun kx-emacsp ()
>     (not (functionp #'function-lambda-expression)))
> 
> This was enough,  as function-lambda-expression is not defined in elisp. 
> 
> 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)

> Thank you very much for helping me. 

Regards.





reply via email to

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