[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: code listp to determine wich os I'm running on
From: |
Emanuel Berg |
Subject: |
Re: code listp to determine wich os I'm running on |
Date: |
Wed, 29 Jan 2014 23:27:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Renato <renato.pontefice@gmail.com> writes:
> (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... :-(
No :)
With the `if' in Lisp, if you have more than one form
either for THEN or ELSE, you must use some block
container around those, else the first one will be the
THEN branch, and the second will be the ELSE branch.
So, for example, you can use the `progn' you used
earlier to set the variable *and* message "fatto"
("done" in Italian?) in case of the condition being t -
(if condition
(progn (do-one-thing) (do-second-thing)) ; true
(do-else-thing)) ; false
Also, your Linux slashes are the wrong way (\ instead
of /). This also makes for the string delimiter (")
being *quoted*, so it doesn't terminate the string, but
is instead a string *char*, which should break the
whole thing.
But keep trying :)
--
underground experts united:
http://user.it.uu.se/~embe8573
Re: code listp to determine wich os I'm running on, Pascal J. Bourguignon, 2014/01/29
Re: code listp to determine wich os I'm running on, Louis-Guillaume Gagnon, 2014/01/29
Re: code listp to determine wich os I'm running on, Rusi, 2014/01/29