From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hadron Newsgroups: gmane.emacs.help Subject: Re: Code depending on hostname Date: Wed, 08 Aug 2007 23:04:31 +0200 Organization: http://en.wikipedia.org/wiki/Quark Message-ID: References: <1186605754.499392@sj-nntpcache-2.cisco.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186609277 4233 80.91.229.12 (8 Aug 2007 21:41:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 21:41:17 +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:41:16 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 1IItHC-0000KY-00 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 23:41:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IItHB-0002SR-H6 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 17:41:09 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-X-Trace: individual.net kMuyfeJTJ/A2ac68vfIToQ46tewLGQQ9i10Fwh3jtGWBc/K//H X-Orig-Path: news.individual.net!news Cancel-Lock: sha1:X8qiMEagvAlSU4/cWs/i9zGONf4= sha1:+3+bn0pG66dEclIhD0FI/t5Gq/k= Original-Xref: shelby.stanford.edu gnu.emacs.help:150846 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:46422 Archived-At: Scott Frazer writes: > 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))) Smashing. Thanks.