Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Emacs Lisp file-exists usage
- Date: Wed, 20 Feb 2013 15:43:26 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: [tlug] Emacs Lisp file-exists usage
- References: <5121F55B.9000003@l.u-tokyo.ac.jp>
Although I tend to agree with Curt, I'll assume there's some reason you don't want to mess with the local MTA. Charles Muller writes: (if (file-exists-p "/mail-u-tokyo") (setq mew-smtp-port "25") (setq mew-smtp-server "mail.l.u-tokyo.ac.jp")) `if' evidently works differently from what you think. The form is (if TEST THEN-FORM ELSE-FORMS...) THEN-FORM is a single form, so you need a `progn'. Alternatively, use `when' instead of `if', or a single `setq' (if (file-exists-p "/mail-u-tokyo") (setq mew-smtp-port "25" mew-smtp-server "mail.l.u-tokyo.ac.jp")) or (cond ((file-exists-p "/mail-u-tokyo") (setq mew-smtp-port "25") (setq mew-smtp-server "mail.l.u-tokyo.ac.jp")) ((file-exists-p "/mail-home") (setq mew-smtp-port "587") (setq mew-smtp-server "mail.so-net.ne.jp")))
- Follow-Ups:
- Re: [tlug] Emacs Lisp file-exists usage
- From: Charles Muller
- References:
- [tlug] Emacs Lisp file-exists usage
- From: Charles Muller
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Emacs Lisp file-exists usage
- Next by Date: Re: [tlug] Emacs Lisp file-exists usage
- Previous by thread: Re: [tlug] Emacs Lisp file-exists usage
- Next by thread: Re: [tlug] Emacs Lisp file-exists usage
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links