From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: What's wrong with this lisp code in my init file?! Date: Sun, 31 Dec 2006 23:16:44 +0100 Organization: Norwegian university of science and technology Message-ID: References: <1167581737.951769.216970@k21g2000cwa.googlegroups.com> <1167595028.481477.63360@42g2000cwt.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167604828 3040 80.91.229.12 (31 Dec 2006 22:40:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2006 22:40:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 31 23:40:27 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H19Lp-0004GV-NS for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Dec 2006 23:40:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H19Lp-0007ba-5v for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Dec 2006 17:40:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!news.germany.com!news.banetele.no!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: orkan.itea.ntnu.no 1167602965 5425 129.241.15.140 (31 Dec 2006 22:09:25 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Sun, 31 Dec 2006 22:09:25 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) Cancel-Lock: sha1:8nrbJ6zFI8D/wuKT7B61h9NCA04= Original-Xref: shelby.stanford.edu gnu.emacs.help:144456 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40060 Archived-At: + Eric Hanchrow : | But there's an even more general way to do more than one thing inside | an "if": the "progn" form. It simply does a bunch of things one after | the other: And of course, there is cond: (cond ((eq window-system 'w32) (setq ps-printer-name t) (setq ps-lpr-command "c:/Program Files/Ghostgum/gsview/gsprint.exe")) ((eq window-system nil) (setq ps-printer-name t) (setq ps-lpr-command "/cygdrive/c/Program Files/Ghostgum/gsview/gsprint.exe"))) And then there are when and unless in the cl package: (require 'cl) (when (eq window-system 'w32) (setq ps-printer-name t) (setq ps-lpr-command "c:/Program Files/Ghostgum/gsview/gsprint.exe")) (unless window-system (setq ps-printer-name t) (setq ps-lpr-command "/cygdrive/c/Program Files/Ghostgum/gsview/gsprint.exe")) -- * Harald Hanche-Olsen - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell