From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: (require 'cl) problem Date: 23 Sep 2004 22:49:16 +0200 Organization: [posted via Easynet Spain] Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <871xgs3e43.fsf@thalassa.informatimago.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095972852 927 80.91.229.6 (23 Sep 2004 20:54:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2004 20:54:12 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 23 22:54:03 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CAabK-0002OQ-00 for ; Thu, 23 Sep 2004 22:54:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAahN-0003vf-Ni for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Sep 2004 17:00:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.wirehub.nl!easynet-quince!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Lines: 54 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=XfPOhaS``@1mc=l]@i_giQ7bjRV:bBd4DjF1d]1 Original-Xref: shelby.stanford.edu gnu.emacs.help:125488 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20842 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20842 "It's me FKtPp ;)" writes: > The Emacs Lisp Programing Standard said: > ,---- > | > | * Please don't require the `cl' package of Common Lisp extensions at > | run time. Use of this package is optional, and it is not part of > | the standard Emacs namespace. If your package loads `cl' at run > | time, that could cause name clashes for users who don't use that > | package. > | > | However, there is no problem with using the `cl' package at compile > | time, for the sake of macros. You do that like this: > | > | (eval-when-compile (require 'cl)) > `---- This should only apply to emacs sources themselves! Not to your user code. You are free to use common-lisp. > But when i test this piece of code (byte-compile and restart emacs and > load the elc) > > ,----[ test.el ] > | ;; just want to test cl > | > | ;;; Code: > | > | (eval-when-compile (require 'cl)) > | > | (defun fktpp-test-case () > | "test cl library" > | (interactive) > | (message (if (oddp 22) > | "yes it's odd" > | "no it isn't"))) > | > | (provide 'test) > | ;;; test.el ends here > `---- > > it always tell me the symbol oddp didn't defined. why ? Is there any > thing illegal in my code? Nothing illegal, but use (require 'cl) instead of (eval-when-compile (require 'cl)), or even better, forget emacs and use true Common-Lisp and the Hemlock editor! ;-) -- __Pascal Bourguignon__ http://www.informatimago.com/ Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.