GNU bug report logs - #15139
24.3; Error in section 11.9.3 of the Elisp Reference Manual

Previous Next

Package: emacs;

Reported by: Sian Mountbatten <poenikatu <at> fastmail.co.uk>

Date: Tue, 20 Aug 2013 08:56:01 UTC

Severity: minor

Tags: notabug

Found in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15139 in the body.
You can then email your comments to 15139 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15139; Package emacs. (Tue, 20 Aug 2013 08:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sian Mountbatten <poenikatu <at> fastmail.co.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 20 Aug 2013 08:56:02 GMT) Full text and rfc822 format available.

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

From: Sian Mountbatten <poenikatu <at> fastmail.co.uk>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Error in section 11.9.3 of the Elisp Reference Manual
Date: Tue, 20 Aug 2013 09:54:58 +0100
In section 11.9.3 Lexical Binding of the Elisp Reference Manual, the
following forms are given:

(defvar my-ticker nil)  ; comment

(let ((x 0))
     (setq my-ticker (lambda ()
                       (setq x (1+ x)))))

(funcall my-ticker)

The manual says that the 3rd form (funcall...) yields `1'. When these
forms are evaluated using C-xC-e, the 3rd form enters the debugger with
the error `void variable x'.

In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2)
 of 2013-06-25 on sochi, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: eo.UTF-8
  value of $LC_COLLATE: eo.UTF-8
  value of $LC_CTYPE: eo.UTF-8
  value of $LC_MESSAGES: eo.UTF-8
  value of $LC_MONETARY: eo.UTF-8
  value of $LC_NUMERIC: eo.UTF-8
  value of $LC_TIME: eo.UTF-8
  value of $LANG: eo.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  desktop-save-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
n o w SPC a l m o s t SPC w o r k i n g SPC s a t i 
s f a c t o r i l y . SPC A l l SPC t h a t ' s SPC 
m i s s i n g SPC i s SPC a SPC D e b i a n SPC m e 
n u . <backspace> , SPC b u t SPC t h a t SPC w i l 
l SPC c o m e . < / P <backspace> p > <return> C-x 
C-s C-x k <return> <help-echo> <help-echo> <help-echo> 
<help-echo> C-x C-f s r c / h t m l / g w m <tab> - 
<tab> <backspace> - m a n <tab> <return> C-s p r o 
v i d e s C-s C-s C-s <right> <left> <backspace> C-s 
C-s <right> <left> <backspace> C-s C-s <right> <left> 
<backspace> C-s C-s C-s C-s <up> C-x C-s <help-echo> 
C-x k <return> C-x o SPC <tab> <return> <help-echo> 
<help-echo> <help-echo> <down-mouse-5> <mouse-5> <help-echo> 
<down-mouse-5> <mouse-5> <down-mouse-5> <mouse-5> <help-echo> 
l SPC SPC <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <up> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> C-h f C-g <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> C-x C-e <down> 
<down> <down> <down> C-x C-e q <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> 
<help-menu> <send-emacs-bug-report>

Recent messages:
Saving file /home/sian/Retejo/blog/engblog.html...
Wrote /home/sian/Retejo/blog/engblog.html
Making completion list...
Mark saved where search started [4 times]
Saving file /home/sian/src/html/gwm-2.0-manual.html...
Wrote /home/sian/src/html/gwm-2.0-manual.html
Quit
(lambda nil (setq x (1+ x)))
Entering debugger...
Back to top level.

Load-path shadows:
/usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils skeleton sgml-mode debug make-mode
help-fns bookmark pp misearch multi-isearch cc-langs cl cl-lib cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs etags ring help-mode apropos dired jka-compr info easymenu
desktop time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

-- 
Sian Mountbatten (home web-site http://www.poenikatu.co.uk/>)
Learning C++11 from the C++ Primer 5th edition.
I'm an associate FSF member (no. 10888).
Help us support software freedom! http://www.fsf.org/jf?referrer=10888




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15139; Package emacs. (Tue, 20 Aug 2013 11:27:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#15139: 24.3;
 Error in section 11.9.3 of the Elisp Reference Manual
Date: Tue, 20 Aug 2013 13:08:31 +0200
Sian Mountbatten <poenikatu <at> fastmail.co.uk> writes:

> In section 11.9.3 Lexical Binding of the Elisp Reference Manual, the
> following forms are given:
>
> (defvar my-ticker nil)  ; comment
>
> (let ((x 0))
>      (setq my-ticker (lambda ()
>                        (setq x (1+ x)))))
>
> (funcall my-ticker)
>
> The manual says that the 3rd form (funcall...) yields `1'. When these
> forms are evaluated using C-xC-e, the 3rd form enters the debugger with
> the error `void variable x'.

The manual is speaking of lexical binding, try this or use the code
above in a lexical-binding environment:

(defvar my-ticker nil)  ; comment

(lexical-let ((x 0))
  (setq my-ticker (lambda ()
                    (setq x (1+ x)))))

(funcall my-ticker)

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





Severity set to 'minor' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 20 Aug 2013 15:45:01 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 20 Aug 2013 15:45:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 15139 <at> debbugs.gnu.org and Sian Mountbatten <poenikatu <at> fastmail.co.uk> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 20 Aug 2013 15:45:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Sep 2013 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 271 days ago.

Previous Next


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