From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: `eshell-under-cygwin-p' etc. inappropriate? Date: Mon, 12 Aug 2002 11:19:31 -0700 (PDT) Organization: Sony Electronics Inc. Sender: emacs-devel-admin@gnu.org Message-ID: <20020812.111931.12333219.Takaaki.Ota@am.sony.com> References: <87bs8f8dh7.fsf@bundalo.shootybangbang.com> <20020808.102316.91281422.Takaaki.Ota@am.sony.com> <9743-Sun11Aug2002164949+0300-eliz@is.elta.co.il> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1029176371 21147 127.0.0.1 (12 Aug 2002 18:19:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 12 Aug 2002 18:19:31 +0000 (UTC) Cc: jpw@shootybangbang.com, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17eJms-0005Uy-00 for ; Mon, 12 Aug 2002 20:19:30 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17eKB1-0003qu-00 for ; Mon, 12 Aug 2002 20:44:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eJni-0007iJ-00; Mon, 12 Aug 2002 14:20:22 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17eJn1-0007hB-00 for emacs-devel@gnu.org; Mon, 12 Aug 2002 14:19:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17eJmz-0007gz-00 for emacs-devel@gnu.org; Mon, 12 Aug 2002 14:19:38 -0400 Original-Received: from mail2.fw-bc.sony.com ([160.33.98.69]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eJmz-0007gu-00 for emacs-devel@gnu.org; Mon, 12 Aug 2002 14:19:37 -0400 Original-Received: from mail1.bc.in.sel.sony.com (mail1.bc.in.sel.sony.com [43.144.65.11]) by mail2.fw-bc.sony.com (8.8.8/8.8.8) with ESMTP id SAA29231; Mon, 12 Aug 2002 18:19:35 GMT Original-Received: by mail1.bc.in.sel.sony.com id SAA01854; Mon, 12 Aug 2002 18:19:33 GMT Original-To: eliz@is.elta.co.il In-Reply-To: <9743-Sun11Aug2002164949+0300-eliz@is.elta.co.il> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew-3.0.60 on Emacs-21.3.50.1 (i386-msvc-nt5.0.2195) of 2002-08-09 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6477 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6477 Sun, 11 Aug 2002 16:49:49 +0300: "Eli Zaretskii" wrote: > > From: Tak Ota > > Date: Thu, 08 Aug 2002 10:23:16 -0700 (PDT) > > > > 07 Aug 2002 06:06:12 +0100: John Paul Wallington wrote: > > > > > Maybe `eshell-under-cygwin-p' should be called something else? > > > > I use the following function for my own use. > > > > (defun cygwin-exists-p () > > "Search cygwin1.dll in the exec-path and return the full path if it exists or nil otherwise." > > (catch 'exists > > (let ((path-list exec-path)) > > (while path-list > > (let ((full-path (expand-file-name "cygwin1.dll" (car path-list)))) > > (if (file-exists-p full-path) > > (throw 'exists full-path)) > > (setq path-list (cdr path-list))))))) > > I think this might be dangerous: a user could have some Cygwin tools > installed, but she could still be using a natively-co9mpiled Emacs. > > In other words, the mere fact of cygwin.dll's existence does not > necessarily mean that this Emacs is a Cygwin binary. You are right. For that purpose I think `system-type' should provide appropriate distinction between the two. `cygwin-exists-p' does nothing more than what its name and doc string say. -Tak