From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#47588: 28.0.50; C-M-x in emacs-lisp-mode: elisp--eval-defun: =?UTF-8?Q?Symbol=E2=80=99s?= function definition is void: nil [3 times] Date: Sun, 18 Apr 2021 01:06:35 -0400 Message-ID: References: <837dliebu7.fsf@gnu.org> <1869622e1629fd40f6c9@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21074"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47588-done@debbugs.gnu.org, Jean Louis To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 18 07:09:12 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 1lXzgF-0005Pg-QQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Apr 2021 07:09:12 +0200 Original-Received: from localhost ([::1]:59332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXzgE-0003KR-SI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Apr 2021 01:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXzeA-0002ci-KU for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2021 01:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXzeA-0007P9-DN for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2021 01:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXzeA-0001zn-2G for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2021 01:07:02 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Apr 2021 05:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 47588 X-GNU-PR-Package: emacs Mail-Followup-To: 47588@debbugs.gnu.org, monnier@iro.umontreal.ca, bugs@gnu.support Original-Received: via spool by 47588-done@debbugs.gnu.org id=D47588.16187224067612 (code D ref 47588); Sun, 18 Apr 2021 05:07:01 +0000 Original-Received: (at 47588-done) by debbugs.gnu.org; 18 Apr 2021 05:06:46 +0000 Original-Received: from localhost ([127.0.0.1]:45101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXzdt-0001yi-Ow for submit@debbugs.gnu.org; Sun, 18 Apr 2021 01:06:45 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXzdr-0001yV-Nl for 47588-done@debbugs.gnu.org; Sun, 18 Apr 2021 01:06:44 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 744184407AF; Sun, 18 Apr 2021 01:06:38 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C8D9D440815; Sun, 18 Apr 2021 01:06:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1618722396; bh=DdLlA+1AU7aRtWE9+geSPxYvo9+s3LhT+R+aQ2YAHDU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=KcubngpcpQSUF/QU0RY1hRoLzeb3k5fe9uju6KCgZSCGZZbaMk6EugDVs0/+gEg+c HlOHi01iqYdF6+oI78H5+b56ivfbXzJxHk54xuaK52gLSpxnca6OKiqRMZb0O0bv0L 4KxznMRCTzhqQ4qeuXWZOYeXVIuQJpPpoV91SI5YZsN2XbBrsI7gJ+KpWtLgf+iES0 pPjYNWqQyHZ+rtXwNn7wtMBt22D1ZGkodhp3K+Lr7PsxV+YnQJByH67QdQNwFqevLR 9c23EV134hrHZH+mBt5L1DAaV2J+XW6PzRRPQ5e1IrGO7amkGOrYGQ8hiqGuydDl4v YbxEfiSqLfsog== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 88967120262; Sun, 18 Apr 2021 01:06:36 -0400 (EDT) In-Reply-To: <1869622e1629fd40f6c9@heytings.org> (Gregory Heytings's message of "Sat, 17 Apr 2021 23:48:53 +0000") 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:204296 Archived-At: It took me a while to figure out that the Symbol=E2=80=99s function definition is void: nil was coming from `load-read-function` being nil (which was due to it being rebound to nil by the `debug` function). I installed the patch below which seems to fix it. It's all still pretty messy, sadly. Stefan commit 5c07cd0f156217db268ccb9fa64566fb429c4257 (HEAD -> trunk, origin/mast= er, origin/HEAD) Author: Stefan Monnier Date: Sun Apr 18 01:03:43 2021 -0400 * lisp/emacs-lisp/debug.el (debug): Fix (bug#47588) =20=20=20=20 Don't bind `load-read-function` to nil but to its actual default value. Actually, I'm not sure it's worth the trouble rebinding this var, but if we do, then we should bind it to a valid value rather than to nil. =20=20=20=20 * lisp/emacs-lisp/edebug.el (edebug--eval-defun): Re-install our advice if needed. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index b2d54c77feb..069c7a90ad0 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -213,7 +213,7 @@ debug last-input-event last-command-event last-nonmenu-event last-event-frame overriding-local-map - load-read-function + (load-read-function #'read) ;; If we are inside a minibuffer, allow nesting ;; so that we don't get an error from the `e' command. (enable-recursive-minibuffers diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index cbc40193125..b08ee3c4a17 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -459,6 +459,9 @@ edebug--eval-defun If acting on a `defun' for FUNCTION, and the function was instrumented, `Edebug: FUNCTION' is printed in the minibuffer. If not instrumented, just FUNCTION is printed." + ;; Re-install our advice, in case `debug' re-bound `load-read-function' = to + ;; its default value. + (add-function :around load-read-function #'edebug--read) (let* ((edebug-all-forms (not (eq (not edebug-it) (not edebug-all-defs))= )) (edebug-all-defs edebug-all-forms)) (funcall orig-fun nil)))