all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Visuwesh <visuweshm@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 63881@debbugs.gnu.org
Subject: bug#63881: 29.0.91; apropos-documentation fails when load-history contains element whose CAR is nil
Date: Sun, 04 Jun 2023 08:31:58 +0300	[thread overview]
Message-ID: <83cz2b7pyp.fsf@gnu.org> (raw)
In-Reply-To: <878rd0c4df.fsf@gmail.com> (message from Visuwesh on Sun, 04 Jun 2023 08:37:08 +0530)

> From: Visuwesh <visuweshm@gmail.com>
> Date: Sun, 04 Jun 2023 08:37:08 +0530
> 
> 
> As per (info "(elisp) Where Defined"), load-history may contain an
> element whose CAR is nil if eval-buffer was used to evaluate a defun
> in a non-file-visiting buffer.
> 
> After such an entry is added to load-history, apropos-documentation
> fails with the backtrace at end.

How did you add such an entry to load-history?  IOW, is there a
real-life use case where this happens?

> To reproduce the issue,
> 
>     1. emacs -Q
>     2. Insert (defun test () t)
>     3. M-x eval-buffer RET
>     4. Confirm that a nil entry is present in load-history by evaluating
>        (alist-get nil load-history 'none)
>     5. C-h d any RET
> 
> The problem lies in apropos--map-preloaded-atoms in the part
> 
>     (dolist (x load-history)
>       (when (string-match preloaded-regexp (car x))
>                                            ^^^^^^^^
>         (dolist (def (cdr x))
>           (cond
>            ((symbolp def) (funcall f def))
>            ((eq 'defun (car-safe def)) (funcall f (cdr def)))))))))
> 
> 
> ----
> 
> 
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   string-match("\\`/home/viz/lib/ports/emacs/lisp/\\(?:abbrev\\|b\\(?:..." nil)
>   (if (string-match preloaded-regexp (car x)) (progn (let ((tail (cdr x))) (while tail (let ((def (car tail))) (cond ((symbolp def) (funcall f def)) ((eq ... ...) (funcall f ...))) (setq tail (cdr tail)))))))





  reply	other threads:[~2023-06-04  5:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-04  3:07 bug#63881: 29.0.91; apropos-documentation fails when load-history contains element whose CAR is nil Visuwesh
2023-06-04  5:31 ` Eli Zaretskii [this message]
2023-06-04  8:34   ` Visuwesh
2023-06-05  7:50   ` Matt Beshara
2023-06-10  9:25   ` Eli Zaretskii
2023-06-10 16:18     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-10 17:49       ` Eli Zaretskii

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=83cz2b7pyp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63881@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=visuweshm@gmail.com \
    /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.