unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 9239be8e76: ; Fix documentation of 'compiled-function-p' (bug#56648)
       [not found] ` <20220814164659.B616CC01680@vcs2.savannah.gnu.org>
@ 2022-08-14 17:35   ` Stefan Monnier
  2022-08-14 17:51     ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2022-08-14 17:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>  @defun compiled-function-p object
>  This function returns @code{t} if @var{object} is a function object
> -implemented in byte-code or machine code.
> +that was either byte-compiled (@pxref{Byte Compilation}) or
> +natively-compiled (@pxref{Native Compilation}).
>  @end defun

Hmm... it also returns t if the function is a built-in or provided by
a dynamically loaded module, which is why I had kept the wording less specific.

I guess that's also why Lars suggested to use
`not-compiled-function-p` instead.  The way I think of it, the main
property of a `compiled-function` is that it's a function and it can't
usefully be passed to `byte-compile`.

FWIW, Common Lisp defines the type as follows:

    Any function may be considered by an implementation to be
    a compiled function if it contains no references to macros that
    must be expanded at run time, and it contains no unresolved
    references to load time values.  See Section 3.2.2 (Compilation
    Semantics).

    Functions whose definitions appear lexically within a file that has
    been compiled with compile-file and then loaded with load are of
    type compiled-function. Functions produced by the compile function
    are of type compiled-function. Other functions might also be of type
    compiled-function.


-- Stefan




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

* Re: master 9239be8e76: ; Fix documentation of 'compiled-function-p' (bug#56648)
  2022-08-14 17:35   ` master 9239be8e76: ; Fix documentation of 'compiled-function-p' (bug#56648) Stefan Monnier
@ 2022-08-14 17:51     ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2022-08-14 17:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Sun, 14 Aug 2022 13:35:10 -0400
> 
> >  @defun compiled-function-p object
> >  This function returns @code{t} if @var{object} is a function object
> > -implemented in byte-code or machine code.
> > +that was either byte-compiled (@pxref{Byte Compilation}) or
> > +natively-compiled (@pxref{Native Compilation}).
> >  @end defun
> 
> Hmm... it also returns t if the function is a built-in or provided by
> a dynamically loaded module, which is why I had kept the wording less specific.

I can only fix what I can read and understand.

Should be fixed now.



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

end of thread, other threads:[~2022-08-14 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <166049561942.12175.12224769904791369964@vcs2.savannah.gnu.org>
     [not found] ` <20220814164659.B616CC01680@vcs2.savannah.gnu.org>
2022-08-14 17:35   ` master 9239be8e76: ; Fix documentation of 'compiled-function-p' (bug#56648) Stefan Monnier
2022-08-14 17:51     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).