From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter S Galbraith Newsgroups: gmane.emacs.help Subject: Re: multi-line conditionals in elisp Date: Sun, 22 Dec 2002 14:21:15 -0500 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20021222192115.A5245429E2@mixed.dyndns.org> References: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1040585353 11056 80.91.224.249 (22 Dec 2002 19:29:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 22 Dec 2002 19:29:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18QBjw-0002mO-00 for ; Sun, 22 Dec 2002 20:26:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18QBhu-0007Wm-09 for gnu-help-gnu-emacs@m.gmane.org; Sun, 22 Dec 2002 14:24:14 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18QBfN-0005vR-00 for help-gnu-emacs@gnu.org; Sun, 22 Dec 2002 14:21:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18QBf5-0005kl-00 for help-gnu-emacs@gnu.org; Sun, 22 Dec 2002 14:21:20 -0500 Original-Received: from adsl-66.110.147-253.globetrotter.net ([66.110.147.253] helo=mixed.dyndns.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18QBf3-0005jm-00 for help-gnu-emacs@gnu.org; Sun, 22 Dec 2002 14:21:17 -0500 Original-Received: from mixed.dyndns.org (localhost [127.0.0.1]) by mixed.dyndns.org (Postfix) with ESMTP id A5245429E2; Sun, 22 Dec 2002 14:21:15 -0500 (EST) Original-To: Michael Powe In-Reply-To: Message from Michael Powe of "Sun, 22 Dec 2002 19:00:43 GMT." X-Mailer: MH-E 7.0+cvs; nmh 1.0.4+dev; Emacs 21.2 X-Face: "#bYm%*(4JuXAkouMxaLz|M2dbXUFnQ"IRX)zpsiM"(B}`#|_b548$VB}5L&VIck1F#FNc' rsASk0?-/gFp2qzM>0]`Jc}Qd<8[l)N7{8%qMN~{|DS.ME.$ X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4951 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4951 Michael Powe wrote: > this is trivial in other languages, but not, it seems, in elisp. (i > think it's just a case of, i don't really understand the language.) The latter. > (if (locate-library "python-mode") > (cond((autoload 'python-mode "python-mode" "Python editing mode" t) > (setq auto-mode-alist > (cons '("\\.py$" . python-mode) auto-mode-alist)))) > (message "python library not found")) (if (locate-library "python-mode") (progn (autoload 'python-mode "python-mode" "Python editing mode" t) (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))) (message "python library not found")) or (if (not (locate-library "python-mode")) (message "python library not found") (autoload 'python-mode "python-mode" "Python editing mode" t) (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))) or forget the message: (when (locate-library "python-mode") (autoload 'python-mode "python-mode" "Python editing mode" t) (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))) Peter