From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: `eshell-under-cygwin-p' etc. inappropriate? Date: Sun, 11 Aug 2002 16:49:49 +0300 Sender: emacs-devel-admin@gnu.org Message-ID: <9743-Sun11Aug2002164949+0300-eliz@is.elta.co.il> References: <87bs8fn34y.fsf@alice.dynodns.net> <87bs8f8dh7.fsf@bundalo.shootybangbang.com> <20020808.102316.91281422.Takaaki.Ota@am.sony.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1029073946 4517 127.0.0.1 (11 Aug 2002 13:52:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 11 Aug 2002 13:52:26 +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 17dt8r-0001Ak-00 for ; Sun, 11 Aug 2002 15:52:25 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17dtWQ-0006wR-00 for ; Sun, 11 Aug 2002 16:16:46 +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 17dt9b-0006rX-00; Sun, 11 Aug 2002 09:53:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17dt9F-0006qw-00 for emacs-devel@gnu.org; Sun, 11 Aug 2002 09:52:49 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17dt99-0006qj-00 for emacs-devel@gnu.org; Sun, 11 Aug 2002 09:52:49 -0400 Original-Received: from balder.inter.net.il ([192.114.186.15]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17dt99-0006qe-00 for emacs-devel@gnu.org; Sun, 11 Aug 2002 09:52:43 -0400 Original-Received: from Zaretsky ([80.230.2.40]) by balder.inter.net.il (Mirapoint Messaging Server MOS 3.1.0.58-GA) with ESMTP id BQQ48695; Sun, 11 Aug 2002 16:52:15 +0300 (IDT) Original-To: Takaaki.Ota@am.sony.com X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-Reply-To: <20020808.102316.91281422.Takaaki.Ota@am.sony.com> (message from Tak Ota on Thu, 08 Aug 2002 10:23:16 -0700 (PDT)) 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:6445 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6445 > 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.