From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#46387: 28.0.50; Compiled code making a variable dynamic stopped working Date: Mon, 08 Feb 2021 18:29:56 +0100 Message-ID: <87h7mm79ij.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23955"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= To: 46387@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 08 22:37:28 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l9EDo-00066S-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 22:37:28 +0100 Original-Received: from localhost ([::1]:56828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9EDl-0006g1-52 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 16:37:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9ANO-0003fx-9G for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 12:31:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9ANK-00034r-KT for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 12:31:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9ANK-0005D6-HX for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 12:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Feb 2021 17:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46387 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161280541319953 (code B ref -1); Mon, 08 Feb 2021 17:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Feb 2021 17:30:13 +0000 Original-Received: from localhost ([127.0.0.1]:51842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9AMW-0005Bk-Nq for submit@debbugs.gnu.org; Mon, 08 Feb 2021 12:30:13 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:51836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9AMV-0005Bd-6c for submit@debbugs.gnu.org; Mon, 08 Feb 2021 12:30:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9AMV-0003Cs-00 for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 12:30:11 -0500 Original-Received: from mout.web.de ([212.227.17.11]:53455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9AMP-0002fZ-G7 for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 12:30:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1612805398; bh=6Q7bhl+Mo/4vETjbcyggNBoTjta3GHDLvT+zhelSEn4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=ROr+07MKQMtui+dVa1TGY3h0XSbWgNxTdL/nYOXAeDpoJFJHAFnopq9jTqgMwZiCw QAm1n1oCDcX1pR9iCKDz9wC5ITcXW68+XjpaOw6p91qYukPXoL1ocKINqGWqNBJZWn +hohBRDtmeWzvxbwTARkFhwg5+HmgDOpyjhYld84= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.220.60]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MV4bp-1lPH0V28Yn-00YVDV; Mon, 08 Feb 2021 18:29:58 +0100 X-Provags-ID: V03:K1:WKhBV6l7+2Uj/vbSzgoGdISZVT9mY03MwKNXLWwX3kyjL6P/OK/ sowq/WApVLaFDslT+HebO1Rh9kX9FpOyqswQYDSjDcmY1I9nIBQnBfYrBp1Qssf8kuQ1gTX dYgGElStWKjd/K9afAAFX7GmC30n0GJHEqK0AQz/n4IOW0u+dfFfC1TVZsTaOrbiVMz5PGU QKqVfDcr1qJuAf/0R+8NA== X-UI-Out-Filterresults: notjunk:1;V03:K0:Rp0KbT3G0c4=:a6h37OsqIXWOFYLacAka8l 7sSmu/8l3us561u92d1qQ7hISi0g7oxEL6OiAJqTDGlBUYkAOutWTVjVLw7w4jYP/q7alyCCy S4/hZyEd9DNz803smUVEx527yKBBbfqTmjZ/zdmJDnd3Ch6uvO47jb5DuzMAtWcqAbbTng3ic UXMdA8BTc6LDSp6Ft/GUMvYbvQCZ8D7QbyMsvUgvzbmoDQK1S71AhkQ2amqGXR+M9IQnlWtOS qfG0uTwQLLNmOPvQxNbkhErJ9XPILrMBuYxoK1T+4HrqvJxmkb8CbsjCK+6u9UE2gpTyQoW/P WAc8/e/acfdciH9e8J9x3uuK4qHqM73WMCctVCMEqDdAIqBltWGEgakhvQEibZJyH43JBgNjz rKoIS87Rmc4OekCWTlW2h/7x54/XGQYWBdmGr2b0J3hePoJbmABb1+6rvo7eq+F8mxD7p8xqu khh86wnSs2n8gij8QYUVnPpYpXCR8wLIE3ixKP3hdgv741MrAetQhEReszlgvCLI3e6GaCqGK n3khgYliYel1iX8c3OVm6jBeg3QvZ2AsdwdhY6dHNuizKIXZEZfxK96CBm9UX4wo7G++T4A/q 1xwVxXym/ILlaKku050mh9i6MwVc3Bs2rQFfZ5zm6W37YdjtrRAjB/nURJVQYB29UeKFGWwX6 xn7RDFNL7ZPxwMdJiPobX6cDhKGWO1GlrB6xthcsh4rgzOnyx0HBOErNVh8oyo5Lf17FwkYd0 1WOrV1pQ2qXrR2Two9EgnX7s12VD0ptw5gb7anXh9MJXaFc0oOdyG0kV+/xvv+nDPrbqGCsn Received-SPF: pass client-ip=212.227.17.11; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199625 Archived-At: Hello, the latest changes in byte-opt.el seem to have broken some of my code. It worked since yesterday, and it still works when interpreted, but the compiled code raises this error today: #+begin_src emacs-lisp Debugger entered--Lisp error: (void-variable number) bbdb-anniv-diary-entries() alarm-clock-diary-list-entries-hook-fun-to-alarm-clock(bbdb-anniv-diary-entries #f(compiled-function (dt) #) #f(compiled-function (&rest args2) #)) #f(compiled-function () #)() [...] #+end_src `alarm-clock-diary-list-entries-hook-fun-to-alarm-clock' has this definition: #+begin_src emacs-lisp (defun alarm-clock-diary-list-entries-hook-fun-to-alarm-clock (fun &optional date-fun filter-return) ;; For functions to put in `diary-list-entries-hook', ;; e.g. `bbdb-anniv-diary-entries' (require 'calendar) (require 'diary-lib) (with-suppressed-warnings ((lexical date original-date number)) (defvar date) (defvar original-date) (defvar number)) (defvar diary-entries-list) (let* ((date (funcall (or date-fun #'identity) (calendar-current-date))) (original-date date) (diary-entries-list '()) (number 1)) (funcall fun) (dolist (to-add (funcall (or filter-return #'identity) (mapcar #'substring-no-properties (mapcar #'cadr diary-entries-list)))) (alarm-clock-add-automatically-maybe to-add (list (alarm-clock-last-midnight)) nil '((origin . diary-list-entries-hook-fun)))))) #+end_src FUN is bound to `bbdb-anniv-diary-entries'. `number' should be bound dynamically when that function is `funcall'ed. TIA, Michael. In GNU Emacs 28.0.50 (build 34, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-02-08 built on drachen Repository revision: f0afbebe7c423ec8b1003f88af11122dfec28dd1 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Debian GNU/Linux bullseye/sid