[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DEFU* macro name for a extern DEFUN: DEFUE? DEFUNEX?
From: |
Stefan Monnier |
Subject: |
Re: DEFU* macro name for a extern DEFUN: DEFUE? DEFUNEX? |
Date: |
Thu, 14 Apr 2011 22:15:56 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> How about this idea instead? It would not replace any DEFUNs.
> We put the line "static" in front of functions that are not exported.
> For example:
> static
> DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0,
> doc: /* Return t if OBJECT is a built-in function. */)
> (Lisp_Object object)
> {
> if (SUBRP (object))
> return Qt;
> return Qnil;
> }
> This works too. Would it be OK?
No, this is going in the wrong direction. What we want instead is to
extend make-docfile so that the DEFUNs, DEFSYMs (and any other similar
thing we may have) automatically create a global foo.h file which
declares all those objects, which are global anyway (because they're
global on the Lisp side). I.e. we want to make all those C-and-Lisp
objects even less static than they are now.
We recently did that for DEFVARs and that was a very good change.
Stefan