>>> I propose to refactor such code >>> >>> (message "Ispell error: %s" output) >>> (sit-for 5) >>> >>> to a new separate function, e.g. >>> >>> (important-message 5 "Ispell error: %s" output) >>> >>> with a simple implementation >>> >>> (defun important-message (seconds format-string &rest args) >>> (apply #'message format-string args) >>> (sit-for seconds)) >>> >>> Then users could easily override such annoying delay. >>> Or maybe even the default implementation can check >>> if set-message-functions already contains set-multi-message >>> that ensures that the important message will not be missed, >>> and not to use sit-for in this case. >> >> I don't mind much, but is this really the best we can do? > > This is just the first thing that we could do. > So the first task is to find all such places, > and replace them with the single function call. > >> Asking users to customize Emacs by overriding functions is not very >> friendly, and in this case we certainly could do better, for example >> by making 5 be a defcustom. > > A defcustom would be one option. 'set-important-message' like > implemented by Ihor would be another option. All this could be > added after creating the new function 'important-message'. So here is the new function 'important-message' and its calls in two discussed places. I'm not sure why 'after-find-file' uses non-nil NODISP arg in (sit-for 1 t). This means is that the message is not displayed? Then why 'message' is called? I'm asking this because if NODISP is unnecessary then the signature of 'important-message' without NODISP will be shorter and more nice to use.