unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: Strange use of (run-with-timer 0 nil #'foo args) in do-after-load-evaluation
Date: Sat, 26 Oct 2019 10:14:07 +0000	[thread overview]
Message-ID: <20191026101407.GA17424@ACM> (raw)

Hello, Emacs.

In do-after-load-evaluation, we have the following, near the end:

          (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?

The reason I ask is that whilst loading my desktop, the prompt

        Please type y, n, or !, or C-v to scroll:

, asking me whether I want dangerous local variables to be loaded, is
getting obscured by the less important

        Package cl is deprecated

, and I have to know that I'm expected to respond to this obscured
prompt.  This has been happening to me only for a short time, at least a
week, but probably less than a month.

This last message about cl being deprecated is being output by the
strange run-with-timer.  If I replace the run-with-timer form with a
straight message call, I see the prompt from hack-local-variables.

What is going on, here?  Is the run-with-timer mechanism being used
deliberately to make the "deprecated" message prevail over other
messages?  If so, perhaps it shouldn't be.

<A bit later>

I've searched the git log, and found that cl was moved into lisp/obsolete
on 2019-08-06.  At the same time, some change was made to output the
"deprecated" message in do-after-load-evaluation.

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.

-- 
Alan Mackenzie (Nuremberg, Germany).



             reply	other threads:[~2019-10-26 10:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-26 10:14 Alan Mackenzie [this message]
2019-10-26 12:41 ` Strange use of (run-with-timer 0 nil #'foo args) in do-after-load-evaluation Stefan Monnier
2019-10-26 13:16   ` Lars Ingebrigtsen
2019-10-26 16:38     ` Stefan Monnier
2019-10-27  1:01       ` HaiJun Zhang
2019-10-27 21:57     ` Juri Linkov
2019-10-27 22:29       ` Juri Linkov
2019-10-28  9:41         ` martin rudalics
2019-10-28  2:13       ` Stefan Monnier
2019-10-28 10:45       ` Lars Ingebrigtsen
2019-10-28 22:19         ` Juri Linkov
2019-10-28 23:20           ` Stefan Kangas
2019-10-29 23:39             ` Juri Linkov
2019-10-29 11:38           ` Lars Ingebrigtsen
2019-10-29 23:45             ` Juri Linkov
2019-10-29 23:58               ` Lars Ingebrigtsen
2019-10-30  8:22                 ` martin rudalics
2019-10-30 22:10                 ` Juri Linkov
2019-10-31  2:00                   ` Stefan Monnier
2019-11-03 20:50                     ` Juri Linkov
2019-10-26 14:18   ` Alan Mackenzie
2019-10-26 15:27   ` Juanma Barranquero
2019-10-27 21:51 ` Juri Linkov
2019-10-28  3:34   ` 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

  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=20191026101407.GA17424@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.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).