GNU bug report logs - #78156
31.0.50; 3.2 Install a Function Definition

Previous Next

Package: emacs;

Reported by: badli al rashid <theothernighttheotherday <at> gmail.com>

Date: Wed, 30 Apr 2025 06:03:02 UTC

Severity: normal

Merged with 78157

Found in version 31.0.50

Full log


Message #13 received at 78156 <at> debbugs.gnu.org (full text, mbox):

From: badli al rashid <theothernighttheotherday <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78156 <at> debbugs.gnu.org
Subject: Re: bug#78156: 31.0.50; 3.2 Install a Function Definition
Date: Wed, 30 Apr 2025 14:57:32 +0800
[Message part 1 (text/plain, inline)]
I just do what the info file stated "Place the cursor after the last
parenthesis of the
function definition and type ‘C-x C-e’" but the output was the one I got.
Sent from Gmail

On Wed, Apr 30, 2025, 14:31 Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: badli al rashid <theothernighttheotherday <at> gmail.com>
> > Date: Wed, 30 Apr 2025 14:01:30 +0800
> >
> > From the elisp intro book, 3.2 Install a Function Definition.
> > An error occur when installing / running (C-x C-e) the function below
> >
> >      (defun multiply-by-seven (number)
> >        "Multiply NUMBER by seven."
> >        (* 7 number))
> >
> > Debugger entered--Lisp error: (void-variable number)
> >   (* 7 number)
> >   (progn (* 7 number))
> >   eval((progn (* 7 number)) t)
> >   elisp--eval-last-sexp(nil)
> >   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
> >   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
> (error) eval-expression--debug)
> >   eval-last-sexp(nil)
> >   funcall-interactively(eval-last-sexp nil)
> >   call-interactively(eval-last-sexp nil nil)
> >   command-execute(eval-last-sexp)
> >   recursive-edit()
> >   debug(error (void-variable definition.) :backtrace-base
> eval-expression--debug)
> >   eval-expression--debug((void-variable definition.))
> >   (progn definition.)
> >   eval((progn definition.) t)
> >   elisp--eval-last-sexp(nil)
> >   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
> >   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
> (error) eval-expression--debug)
> >   eval-last-sexp(nil)
> >   funcall-interactively(eval-last-sexp nil)
> >   call-interactively(eval-last-sexp nil nil)
> >   command-execute(eval-last-sexp)
> >   recursive-edit()
> >   debug(error (void-variable number) :backtrace-base
> eval-expression--debug)
> >   eval-expression--debug((void-variable number))
> >   (* 7 number)
> >   (progn (* 7 number))
> >   eval((progn (* 7 number)) t)
> >   elisp--eval-last-sexp(nil)
> >   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
> >   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
> (error) eval-expression--debug)
> >   eval-last-sexp(nil)
> >   funcall-interactively(eval-last-sexp nil)
> >   call-interactively(eval-last-sexp nil nil)
> >   command-execute(eval-last-sexp)
>
> Please describe what you did, because I cannot reproduce the problem.
> My steps were:
>
>  . emacs -Q
>  . insert the function's definition into the *scratch* buffer
>  . C-x C-e on the closing parenthesis of the function to install the
>    function in Emacs
>  . type (multiply-by-seven 10) into *scratch* buffer
>  . type C-x C-e after that
>  . the result (70) is shown in the echo area, as expected
>
> So I see no bug here.
>
> From the backtrace you show, I'm guessing that you evaluated something
> like
>
>    (multiply-by-seven number)
>
> without making 'number' a variable with some numerical value.
>
[Message part 2 (text/html, inline)]

This bug report was last modified 52 days ago.

Previous Next


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