Subject: Re: bug#74890: 31.0.50; (thing-at-point 'string) raises error

From: Eli Zaretskii <[email-masked]>
Date: Sun, 15 Dec 2024 20:31:34 +0200

> From: Jean Louis <[email-masked]>
> Date: Sun, 15 Dec 2024 11:27:24 +0300
> 
> 
> I can see that I cannot run (thing-at-point 'string) safely, though I
> cannot exactly determine the condition.
> 
> In the buffer I have only this:
> 
> Hello
> 
> which is string "Hello" and when I place cursor behind "o" and run
> (thing-at-point 'string) I am getting the backtrace below. But if I make
> one space like "Hello " and place cursor on that empty space in the
> buffer, I am getting NIL and no error.  Though I cannot repeat this with
> emacs -Q and thus I do not know why is this happening exactly.
> 
> I think that  (eq (char-syntax (char-after)) 34) cannot read the char
> which is not there "after".
> 
> Backtrace:
> 
> Debugger entered--Lisp error: (wrong-type-argument characterp nil)
>   char-syntax(nil)
>   (eq (char-syntax (char-after)) 34)

Please show a complete recipe, preferably starting from "emacs -Q".  I
tried to reproduce this problem, but couldn't, which probably means
some special steps are required to see it.

I also don't understand your claims about "char after", because
there's always something "after" point.