unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Gregory Heytings <gregory@heytings.org>
Cc: 47588-done@debbugs.gnu.org, Jean Louis <bugs@gnu.support>
Subject: bug#47588: 28.0.50; C-M-x in emacs-lisp-mode: elisp--eval-defun: Symbol’s function definition is void: nil [3 times]
Date: Sun, 18 Apr 2021 01:06:35 -0400	[thread overview]
Message-ID: <jwvwnt02ngk.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <1869622e1629fd40f6c9@heytings.org> (Gregory Heytings's message of "Sat, 17 Apr 2021 23:48:53 +0000")

It took me a while to figure out that the

    Symbol’s 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/master, origin/HEAD)
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Sun Apr 18 01:03:43 2021 -0400

    * lisp/emacs-lisp/debug.el (debug): Fix (bug#47588)
    
    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.
    
    * 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)))






      reply	other threads:[~2021-04-18  5:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-04  5:37 bug#47588: 28.0.50; C-M-x in emacs-lisp-mode: elisp--eval-defun: Symbol’s function definition is void: nil [3 times] Jean Louis
2021-04-04  7:41 ` Eli Zaretskii
2021-04-08 14:21   ` Jean Louis
2021-04-17 17:28     ` Jean Louis
2021-04-17 18:12       ` Eli Zaretskii
2021-04-17 19:13         ` Jean Louis
2021-04-17 23:48     ` Gregory Heytings
2021-04-18  5:06       ` Stefan Monnier [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwnt02ngk.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=47588-done@debbugs.gnu.org \
    --cc=bugs@gnu.support \
    --cc=gregory@heytings.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).