[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (require 'cl) problem
From: |
Pascal Bourguignon |
Subject: |
Re: (require 'cl) problem |
Date: |
23 Sep 2004 22:49:16 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
"It's me FKtPp ;)" <m_pupil@163.com> 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.
- Re: (require 'cl) problem, (continued)
- Re: (require 'cl) problem, John Paul Wallington, 2004/09/24
- Re: (require 'cl) problem, It's me FKtPp ;), 2004/09/24
- Re: (require 'cl) problem, Pascal Bourguignon, 2004/09/24
- Re: (require 'cl) problem, Barry Margolin, 2004/09/24
- Re: (require 'cl) problem, Stefan Monnier, 2004/09/24
Re: (require 'cl) problem,
Pascal Bourguignon <=