From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Scott Frazer Newsgroups: gmane.emacs.help Subject: Re: Code depending on hostname Date: Wed, 08 Aug 2007 16:42:34 -0400 Organization: Ye 'Ol Disorganized NNTPCache groupie Message-ID: <1186605754.499392@sj-nntpcache-2.cisco.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1186609239 4132 80.91.229.12 (8 Aug 2007 21:40:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 21:40:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 08 23:40:38 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IItGf-0000Ci-JD for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 23:40:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IItGf-0002EJ-5V for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 17:40:37 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!out01a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!news-in-02.newsfeed.easynews.com!easynews.com!easynews!hwmnpeer01.phx!news.highwinds-media.com!hw-filter.phx!newsfe08.phx.POSTED!53ab2750!not-for-mail User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) Original-Newsgroups: gnu.emacs.help In-Reply-To: Cache-Post-Path: sj-nntpcache-2.cisco.com!unknown@scfrazer-wxp.cisco.com X-Cache: nntpcache 3.0.2 (see http://www.nntpcache.com/) Original-Lines: 20 Original-NNTP-Posting-Host: 171.70.140.15 Original-X-Complaints-To: newsadmin@cisco.com Original-X-Trace: newsfe08.phx 1186605754 171.70.140.15 (Wed, 08 Aug 2007 13:42:34 MST) Original-NNTP-Posting-Date: Wed, 08 Aug 2007 13:42:34 MST Original-Xref: shelby.stanford.edu gnu.emacs.help:150845 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46421 Archived-At: Hadron wrote: > Could someone possibly advise me on some example lisp of how to do alternate > things based on the hostname of the machine that the code is being run on? > > e.g. > > if hostname is A > call funcA > else if hostname is B > call funcB > else .... > > many thanks for any pointers. (cond ((string= system-name "hostnameA") (funcA)) ((string= system-name "hostnameB") (funcB)) (t (defaultFunc)))