Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only

From: Juri Linkov <[email-masked]>
Date: Sun, 15 Nov 2020 22:27:21 +0200

> Can what you want be achieved by setting set-message-function to
> something suitable?

Inhibiting messages selectively was discussed in bug#42865
where I forgot that this is indeed easily implementable
with the help of set-message-function, e.g.:

  (defcustom inhibit-message-regexp "^View mode: type"
    "Regexp to inhibit messages."
    :type 'regexp)

  (defun inhibit-message-function (message)
    (string-match-p inhibit-message-regexp message))

  (setq set-message-function 'inhibit-message-function)