help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code depending on hostname


From: Hadron
Subject: Re: Code depending on hostname
Date: Wed, 08 Aug 2007 23:04:31 +0200

Scott Frazer <frazer.scott@gmail.com> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]