From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: code listp to determine wich os I'm running on Date: Wed, 29 Jan 2014 18:27:18 -0800 (PST) Message-ID: <737dd77e-fbef-4025-ad8a-d0e8b9bb4387@googlegroups.com> References: <87mwiettum.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1391049016 9539 80.91.229.3 (30 Jan 2014 02:30:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jan 2014 02:30:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 30 03:30:24 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W8hOY-0003cR-Gj for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jan 2014 03:30:22 +0100 Original-Received: from localhost ([::1]:46115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8hOY-0000De-3b for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jan 2014 21:30:22 -0500 X-Received: by 10.68.134.233 with SMTP id pn9mr4443797pbb.5.1391048838893; Wed, 29 Jan 2014 18:27:18 -0800 (PST) X-Received: by 10.50.78.136 with SMTP id b8mr87982igx.12.1391048838645; Wed, 29 Jan 2014 18:27:18 -0800 (PST) Original-Path: usenet.stanford.edu!c10no5115961igq.0!news-out.google.com!vg8ni1igb.0!nntp.google.com!c10no5115959igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.11.38; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.11.38 User-Agent: G2/1.0 Injection-Date: Thu, 30 Jan 2014 02:27:18 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:203513 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95782 Archived-At: On Thursday, January 30, 2014 3:42:58 AM UTC+5:30, Renato wrote: > Sorry Emanuel... > what's wrong? > (if (string= system-type "gnu/linux") > (setq percorso-variable "\home\renato\Dropbox\emacs_prof\") > (message "fatto")) > (if (string= system-type "windows-nt") > (setq percorso "c:/doc/Dropbox") )) > It does,t works... :-( A very common pattern (in 'normal' languages like C/Java etc) is like this if cond1 statement1 else if cond2 statement2 else statement3 You could use an if in lisp for this, but many people prefer a cond (cond (cond1 statement1) (cond2 statement2) (t statement3) ) Look up M-: (info "(elisp)Conditionals") for how to write that -- getting the number of parentheses right is tricky for beginners. Also for other neat shortforms like unless, when etc