From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs Date: Mon, 29 Jul 2013 16:36:25 +0800 Organization: HFG Message-ID: <1375086985.8252.2.camel@Renee-desktop.suse> References: <23837d79-03e3-4792-a4b7-e3a6c96ed390@email.android.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1375087015 13756 80.91.229.3 (29 Jul 2013 08:36:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2013 08:36:55 +0000 (UTC) Cc: guile-user@gnu.org To: =?UTF-8?Q?=E7=99=BD=E3=81=84=E7=86=8A?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jul 29 10:36:57 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 1V3iwq-0001kO-Uu for guile-user@m.gmane.org; Mon, 29 Jul 2013 10:36:57 +0200 Original-Received: from localhost ([::1]:48709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3iwq-0001JO-Bo for guile-user@m.gmane.org; Mon, 29 Jul 2013 04:36:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3iwa-0001Hw-3j for guile-user@gnu.org; Mon, 29 Jul 2013 04:36:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3iwR-0000F9-Kv for guile-user@gnu.org; Mon, 29 Jul 2013 04:36:40 -0400 Original-Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:63180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3iwR-0000Et-Dp for guile-user@gnu.org; Mon, 29 Jul 2013 04:36:31 -0400 Original-Received: by mail-pa0-f52.google.com with SMTP id kq13so5559398pab.11 for ; Mon, 29 Jul 2013 01:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:x-mailer:mime-version :content-transfer-encoding; bh=CrY2k310W9vdRpCAHh8Z+oPSivyBeOVvnUGANrZXH+c=; b=nkKRnbgW9b/7BCwI/Qp+xewxfS546UaGpjDaeGiWAYxh6tqn5NkxMPN6rcimAt8LEm Kepb1pxYZdfizSBsMFJvahKM4KGTeXdyadso+l6hzzaIEMN5UT3VtBRgz43QNRmv7CHD FJIqUkD3UVh4ocbO+eCX95VAlO/Od4Caoyl/uu+rnnOsU8n66gM/HXrmlpqtYVNWU9sz oqDGo2wO+pEqrzCjny0KTbr3ZubMRSude4Gr3wmBWTBSpLyVkw5DF1I3AeRW7x5rUNVi V5G/jom67H67C6ZxN3oZg8j0lEpdND5OsO3bjKpIf9cetmuYBeJrbOLFRuqR8Oc+Lcva oRNg== X-Received: by 10.68.244.73 with SMTP id xe9mr66143324pbc.119.1375086990239; Mon, 29 Jul 2013 01:36:30 -0700 (PDT) Original-Received: from [147.2.147.115] ([203.192.156.9]) by mx.google.com with ESMTPSA id bs3sm75571580pbc.42.2013.07.29.01.36.27 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 29 Jul 2013 01:36:29 -0700 (PDT) In-Reply-To: <23837d79-03e3-4792-a4b7-e3a6c96ed390@email.android.com> X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::234 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:10581 Archived-At: 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.