From: Michael Heerdegen <michael_heerdegen@web.de>
To: 46387@debbugs.gnu.org
Cc: "Mattias Engdegård" <mattiase@acm.org>
Subject: bug#46387: 28.0.50; Compiled code making a variable dynamic stopped working
Date: Mon, 08 Feb 2021 18:29:56 +0100 [thread overview]
Message-ID: <87h7mm79ij.fsf@web.de> (raw)
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) #<bytecode 0x10302b42caa2d23>) #f(compiled-function (&rest args2) #<bytecode -0x159ba228e7b687fb>))
#f(compiled-function () #<bytecode -0xe7267f5f0b223bb>)()
[...]
#+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
next reply other threads:[~2021-02-08 17:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 17:29 Michael Heerdegen [this message]
2021-02-09 10:32 ` bug#46387: 28.0.50; Compiled code making a variable dynamic stopped working Mattias Engdegård
2021-02-09 15:31 ` Stefan Monnier
2021-02-09 16:49 ` Mattias Engdegård
2021-02-09 18:48 ` Stefan Monnier
2021-02-10 3:20 ` Michael Heerdegen
2021-02-10 8:22 ` Mattias Engdegård
2021-02-10 13:49 ` Mattias Engdegård
2021-02-10 22:44 ` Michael Heerdegen
2021-02-11 8:49 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7mm79ij.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=46387@debbugs.gnu.org \
--cc=mattiase@acm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.