all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: About the macro expander
@ 2013-02-04  0:10 Xue Fuqiao
  0 siblings, 0 replies; 3+ messages in thread
From: Xue Fuqiao @ 2013-02-04  0:10 UTC (permalink / raw)
  To: help-gnu-emacs

> and again:
> 
>   (cons t (cons t (cons t (list-of-length 0))))
> 
> and again:
> 
>   (cons t (cons t (cons t nil)))

About this step, why does the 'null be expanded to nil?  I know that the type symbol `null' represents the symbol `nil' in `cl-typep', thus `(cl-typep OBJECT 'null)' is equivalent to `(null OBJECT)'.  But other than that, `null' should be a function, which returns t if OBJECT is nil.

> When trying to understand what (require 'cl) is about, what it aims for,
> you can have a look at: 
> http://www.lispworks.com/documentation/HyperSpec/Front/index.htm
> and Practical Common Lisp http://www.gigamonkeys.com/book/
> and http://cliki.net/

Thanks for your information, but I think CLHS and Practical Common Lisp is too long.  And in many ways, they are incompatible with `cl-lib' in Emacs, such as the `equal' predicate does not distinguish between IEEE floating-point plus and minus zero, and the second argument of `cl-check-type' is treated differently, etc.

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



^ permalink raw reply	[flat|nested] 3+ messages in thread
* About the macro expander
@ 2013-02-03 14:48 Xue Fuqiao
  0 siblings, 0 replies; 3+ messages in thread
From: Xue Fuqiao @ 2013-02-03 14:48 UTC (permalink / raw)
  To: help-gnu-emacs

In the trunk version of (info "(cl) Type Predicates"):

 -- Macro: cl-deftype name arglist forms...
     The type specifier `(NAME ARGS...)' is expanded by calling the
     expander with those arguments; the type symbol `NAME' is expanded
     by calling the expander with no arguments.  The ARGLIST is
     processed the same as for `cl-defmacro' except that optional
     arguments without explicit defaults use `*' instead of `nil' as the
     "default" default.

It says "calling the expander with no arguments", but I don't know what
is the argument of expander (what the argument of expander should be).
I have searched the Emacs FAQ, Emacs Lisp manual, cl-lib manual and the
web, but I don't find anything useful.  Can anybody help (is there an
argument list of the expander)?  Thanks a lot.

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-04  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.18911.1359902924.855.help-gnu-emacs@gnu.org>
2013-02-03 16:13 ` About the macro expander Pascal J. Bourguignon
2013-02-04  0:10 Xue Fuqiao
  -- strict thread matches above, loose matches on Subject: below --
2013-02-03 14:48 Xue Fuqiao

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.