On Wed, May 20, 2020 at 10:22:53PM +0300, Dmitry Gutov wrote: > On 20.05.2020 21:56, Eli Zaretskii wrote: > >To clarify: set-message-function is not supposed to affect all the > >ways we have to show something in the echo area, it is only supposed > >to affect calls to 'message', because that's how messages to the user > >are printed. > > > >eval-last-sexp uses prin1 to display the result, so it is not > >affected, as intended. > > But aren't all echo area displays targeted at the user anyway? > > I'm not saying the current behavior is necessarily "broken", but > perhaps we could enhance it further. Sorry, I don't quite understand. You are proposing that message-fun should not only take over messages proper but also the repl's print? Because (message "foo") displays foo twice (well once it's foo, as a side effect, then it's "foo", as the repl's "print" part, as the result of the S-expression's evaluation. FWIW, I'd expect setting set-message-function (strange name for a var, BTW) to just take over the side effect, not the repl's "print". But that's just one data point. Cheers -- t