GNU bug report logs - #44157
28.0.50; skeleton bug due to lexical-binding

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 22 Oct 2020 23:10:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 44157 in the body.
You can then email your comments to 44157 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#44157; Package emacs. (Thu, 22 Oct 2020 23:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 22 Oct 2020 23:10:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; skeleton bug due to lexical-binding
Date: Fri, 23 Oct 2020 01:09:43 +0200
[Message part 1 (text/plain, inline)]
0. emacs -Q
1. C-x C-f test.html RET
2. C-c C-t html RET Test RET
=> error in skeleton-internal-1: Symbol’s value as variable is void: resume:

I believe this bug was introduced by this commit:

commit e038a7571ddb9ec2110533fdd1b359150939c58c
Author:     Stefan Monnier <monnier <at> iro.umontreal.ca>
Commit:     Stefan Monnier <monnier <at> iro.umontreal.ca>
CommitDate: Thu Aug 6 18:45:33 2020 -0400

    * lisp/skeleton.el: Use lexical-binding

The following patch fixes the bug, at least for the above recipe.

[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index ea4e5dbc22..6e2c10d971 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -339,7 +339,8 @@ skeleton-internal-list
       (dlet ((str (or str
                       `(setq str
 			     (skeleton-read ',(car skeleton-il)
-			                    nil ,recursive)))))
+			                    nil ,recursive))))
+             resume:)
 	(when (and (eq (cadr skeleton-il) '\n) (not recursive)
 	           (save-excursion (skip-chars-backward " \t") (bolp)))
 	  (setq skeleton-il (cons nil (cons '> (cddr skeleton-il)))))
[Message part 3 (text/plain, inline)]

In GNU Emacs 28.0.50 (build 38, x86_64-pc-linux-gnu, GTK+ Version 3.24.17, cairo version 1.17.3)
 of 2020-10-21 built on strobe-jhalfs
Repository revision: 39271ed108380494667ab680fc71b800f9ea5097
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Linux From Scratch SVN-20200401

Configured using:
 'configure --with-xwidgets 'CFLAGS=-Og -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD PDUMPER LCMS2

Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 23 Oct 2020 11:31:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 26 Oct 2020 21:23:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 44157 <at> debbugs.gnu.org and Stephen Berman <stephen.berman <at> gmx.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 26 Oct 2020 21:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44157; Package emacs. (Mon, 26 Oct 2020 21:24:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 44157 <at> debbugs.gnu.org
Subject: Re: bug#44157: 28.0.50; skeleton bug due to lexical-binding
Date: Mon, 26 Oct 2020 22:22:40 +0100
Stephen Berman <stephen.berman <at> gmx.net> writes:

> 0. emacs -Q
> 1. C-x C-f test.html RET
> 2. C-c C-t html RET Test RET
> => error in skeleton-internal-1: Symbol’s value as variable is void: resume:

Yup.

> The following patch fixes the bug, at least for the above recipe.
>
> diff --git a/lisp/skeleton.el b/lisp/skeleton.el
> index ea4e5dbc22..6e2c10d971 100644
> --- a/lisp/skeleton.el
> +++ b/lisp/skeleton.el
> @@ -339,7 +339,8 @@ skeleton-internal-list
>        (dlet ((str (or str
>                        `(setq str
>  			     (skeleton-read ',(car skeleton-il)
> -			                    nil ,recursive)))))
> +			                    nil ,recursive))))
> +             resume:)

So I've applied the patch to Emacs 28, but I guess there may be similar
things lurking in the skeleton code, if I understand it correctly (but I
probably don't).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 24 Nov 2020 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 269 days ago.

Previous Next


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