emacs-devel
[Top][All Lists]
Advanced

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

Re: Strange use of (run-with-timer 0 nil #'foo args) in do-after-load-ev


From: Stefan Monnier
Subject: Re: Strange use of (run-with-timer 0 nil #'foo args) in do-after-load-evaluation
Date: Sat, 26 Oct 2019 08:41:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>           (run-with-timer 0 nil
>                           (lambda (msg)
>                             (message "%s" msg))
>                           msg)
>
> run-with-timer is being used to run message once, immediately.
> Why not just call message?

Good question.  It's been that way since

    commit 5766c380eec20a19844253cbb511922b6c70fc0b
    Author: Stefan Monnier <address@hidden>
    Date:   Sat Sep 12 03:35:40 2009 +0000
    
        * lread.c (Fload): Don't output a message after loading an obsolete
        package any more (done in Lisp now).
        * subr.el (do-after-load-evaluation): Warn the user after loading an
        obsolete package.

but I can't see any trace of an explanation nor can I find it in my memory.

> What is going on, here?  Is the run-with-timer mechanism being used
> deliberately to make the "deprecated" message prevail over other
> messages?

That's my best guess, yes.

> The current situation seems unsatisfactory; the prompt from
> hack-local-variables is more important than the deprecation message,
> and shouldn't be obscured by it.

It's a kind of general problem with messages, indeed.


        Stefan




reply via email to

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