GNU bug report logs - #73886
29.4; Confusing info about void function cells in Emacs Lisp manual

Previous Next

Package: emacs;

Reported by: Ulrich Müller <ulm <at> gentoo.org>

Date: Sat, 19 Oct 2024 14:39:01 UTC

Severity: normal

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: ulm <at> gentoo.org, 73886 <at> debbugs.gnu.org
Subject: bug#73886: 29.4; Confusing info about void function cells in Emacs Lisp manual
Date: Sun, 27 Oct 2024 13:10:23 -0400
>> -If the function cell is void, the return value is @code{nil}.  It is
>> -impossible to distinguish between a function cell that is void and one
>> -set to @code{nil}.
>
> I would leave the second sentence here alone, but if you don't want to
> say "function cell is void", just say "function that is void".  I
> would not recommend to never use "void function" because otherwise the
> error message we show in those cases will not make sense.

IMO, we should talk about a function being void, but not about its
function cell being void.  And I'd rather not suggest that
distinguishing void from nil is even a meaningful question.

How 'bout the patch below?


        Stefan


diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index bfb8789d05b..7fb9fb37c0a 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1510,10 +1510,7 @@ Function Cells
 @kindex void-function
 This returns the object in the function cell of @var{symbol}.  It does
 not check that the returned object is a legitimate function.
-
-If the function cell is void, the return value is @code{nil}.  It is
-impossible to distinguish between a function cell that is void and one
-set to @code{nil}.
+If the function is void, the return value is @code{nil}.
 
 @example
 @group
@@ -1533,9 +1530,9 @@ Function Cells
 @end defun
 
 @cindex void function cell
-  If you have never given a symbol any function definition, we say
-that that symbol's function cell is @dfn{void}.  In other words, the
-function cell does not have any Lisp object in it.  If you try to call
+  If you have never given a symbol any function definition, its function
+cell contains the default value @code{nil} and we say
+that that function is @dfn{void}.  If you try to call
 the symbol as a function, Emacs signals a @code{void-function} error.
 
   Unlike with void variables (@pxref{Void Variables}), a symbol's





This bug report was last modified 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.