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

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

Re: code listp to determine wich os I'm running on


From: Rusi
Subject: Re: code listp to determine wich os I'm running on
Date: Wed, 29 Jan 2014 20:01:45 -0800 (PST)
User-agent: G2/1.0

On Thursday, January 30, 2014 9:17:26 AM UTC+5:30, Stefan Monnier wrote:
> > (cond ((string= system-type "windows-nt") (message "Microsoft Windows"))
> >       ((string= system-type "darwin")     (message "Darwin"))
> >       ((string= system-type "gnu/linux")  (message "Gnu/Linux"))
> >       (t                                  (message "Unknown system")))

> Please don't compare symbols with string= (which is meant for strings):

>    (cond ((eq system-type 'windows-nt) (message "Microsoft Windows"))
>          ((eq system-type 'darwin)     (message "Darwin"))
>          ((eq system-type 'gnu/linux)  (message "Gnu/Linux"))
>          (t                            (message "Unknown system")))

Whoops!

Actually I did have a vague uneasy feel on seeing those strings... Didn't look 
further


reply via email to

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