emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message's text-properties in *Messages*


From: Stefan Monnier
Subject: Re: Message's text-properties in *Messages*
Date: Wed, 30 May 2018 15:44:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> I didn't mean to answer all of them yet, I will need some time to look
>> at the code.
> Sorry for the long delay in responding.

Come on, it has barely been a week.

>> - Why would arbitrary Lisp code be dangerous (I understand that message_dolog
>>   can be called from within redisplay, but redisplay runs Elisp code
>>   at several places, so "from redisplay" doesn't inherently imply you
>>   can't run Elisp code).
> As I wrote previously, redisplay is not the issue here, as
> message_dolog doesn't call any redisplay entry points.

Hmm... indeed I'm not worried about message_dolog calling redisplay,
instead I think the worry is about redisplay calling message_dolog
(probably via `message` or some variant thereof).

>   . the new function message_dolog_lisp is safe because it accepts a
>     Lisp string, not a C 'char *' pointer

If there's no risk of message_dolog(_lisp) being called *from*
redisplay, then indeed message_dolog_lisp should be perfectly safe and
could even skip the inhibit-*-hooks dance (tho we might want to be
careful about those hooks calling `message` recursively).

And in that case, we could also replace message_dolog with
message_dolog_lisp (if needed, building a fresh new Lisp string from
a char*).


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]