bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51041: [External] : Re: bug#51041: 28.0.60; toggle-truncate-lines sh


From: Stefan Kangas
Subject: bug#51041: [External] : Re: bug#51041: 28.0.60; toggle-truncate-lines should not print message
Date: Tue, 5 Oct 2021 20:28:29 -0400

Drew Adams <drew.adams@oracle.com> writes:

> This corresponds to what we recommend.  We do NOT
> recommend testing with `called-interactively', for
> example.  There's no reason to hard-code whether a
> command called from Lisp can emit a message.  Using
> an optional arg MSG or NOMSG is TRT.
>
> There's lots of old code that does hard-code things
> here.  `count-words' and `count-words-region' are
> good examples of such bad examples.

So this is about avoiding `called-interactively-p'?  If so, I think an
argument is indeed the way to do that.

Another solution would be to have one function meant for interactive
use, and another one for use from Lisp.  That might be too much in this
case, though, as this function seems somewhat uncommon.

A third one would be to do nothing, and say: it's up to the caller to
just call (message "") to clear the echo area, if they don't want the
message there.

But actually, isn't the way to truncate lines just to say this?

    (setq truncate-lines t)

In summary, I don't think I understand the use-case here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]