From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?55m944GE54aK?= Newsgroups: gmane.lisp.guile.user Subject: Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs Date: Mon, 29 Jul 2013 15:21:04 +0400 Message-ID: <66a9b4c8-96e9-421e-b74d-2eb48d26e603@email.android.com> References: <23837d79-03e3-4792-a4b7-e3a6c96ed390@email.android.com> <1375086985.8252.2.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1375096984 27120 80.91.229.3 (29 Jul 2013 11:23:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2013 11:23:04 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jul 29 13:23:03 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V3lXa-0004Us-R0 for guile-user@m.gmane.org; Mon, 29 Jul 2013 13:23:02 +0200 Original-Received: from localhost ([::1]:42480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3lXa-0005dQ-3p for guile-user@m.gmane.org; Mon, 29 Jul 2013 07:23:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3lWR-0003jL-HZ for guile-user@gnu.org; Mon, 29 Jul 2013 07:21:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3lWK-0000xS-7Q for guile-user@gnu.org; Mon, 29 Jul 2013 07:21:51 -0400 Original-Received: from deleuze.hcoop.net ([69.90.123.67]:47716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3lWK-0000xH-3J for guile-user@gnu.org; Mon, 29 Jul 2013 07:21:44 -0400 Original-Received: from [83.149.8.151] (helo=[10.220.32.76]) by deleuze.hcoop.net with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from ) id 1V3lWE-0007yx-Sg for guile-user@gnu.org; Mon, 29 Jul 2013 07:21:39 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <1375086985.8252.2.camel@Renee-desktop.suse> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 69.90.123.67 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10582 Archived-At: Nala Ginrut wrote: >> I would like to program for= Guile as the lowest denominator=2E >> >> What is the proper check I shou= ld define that would tell me whether >I'm currently interpreting the code i= n Guile, or Emacs, or Crisp=2E >> > >If you just want to check whether = a symbol was defined, try: >(module-defined? (current-module) 'function-lam= bda-expression) Hi: Thanks for the tip=2E What I'm trying to do: I ha= ve a host of kx-=2E=2E=2E functions which I want to call from any interpre= ter with the same syntax, i=2Ee=2E let's say for instance (kx-file-open "= funny-file=2Etxt") Now, within the kx-file-open I need to find out whethe= r I'm in guile or clisp or emacs, via a function call, let's say kx-interpr= eter=2E This function should return let's say 0 for guile, 1 for clisp an= d 2 for emacs=2E Based on this, the file open function will use the appropr= iate lisp syntax for opening the file=2E 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=2E=2E=2E -- =E7=99=BD=E3=81=84=E7=86=8A