]> git.eshelyaron.com Git - emacs.git/commit
Avoid spamming view-mode-enter help message
authorBasil L. Contovounesios <contovob@tcd.ie>
Mon, 16 Nov 2020 14:40:57 +0000 (14:40 +0000)
committerBasil L. Contovounesios <contovob@tcd.ie>
Thu, 3 Dec 2020 15:22:00 +0000 (15:22 +0000)
commit805d82197f050d1aba8fb796e604c55ce3d6333a
treec63d232f39e452a82691f65d695c0921cd582fed
parent62fa6d19b3a43296119131fa3d3bad1704b6884c
Avoid spamming view-mode-enter help message

By default, entering view-mode echoes a usage message.  This is
particularly helpful with non-nil view-read-only, to notify the user
that view-mode has been enabled.  It is less useful and more spammy,
however, if view-mode is (possibly inadvertently) entered from some
non-interactive code running in the background, such as when a major
mode is enabled in a temporary buffer for text formatting
purposes (bug#44629).

* lisp/jsonrpc.el (jsonrpc-events-buffer, initialize-instance): Use
buffer-read-only in place of read-only-mode for non-interactive use.
* lisp/view.el (view-mode-enter): Inhibit help message if either
view-inhibit-help-message is non-nil, or view-mode-enter was called
from an interactive command.  Suggested by João Távora
<joaotavora@gmail.com>.
lisp/jsonrpc.el
lisp/view.el