[Top][All Lists]

[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: Lars Ingebrigtsen
Subject: bug#51041: [External] : Re: bug#51041: 28.0.60; toggle-truncate-lines should not print message
Date: Thu, 07 Oct 2021 19:42:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Tyler Grinn <tylergrinn@gmail.com> writes:

> My understanding is that if some functionality or minor mode provides a
> function to toggle it, it is a best practice to use that function rather
> than re-implement it, such that if the behavior of the toggle function
> changes my code doesn't have to change.

We have a number of commands that are meant to be used for interactive
use only (and will give a warning if used from code).  We also have some
commands that are OK to use from code, but only if that code is
user-oriented, and `toggle-truncate-lines' seems very much like that.

Normal code that needs to change truncate-lines should just set the
variable -- which is what happens already.  There's about a hundred
instances of "setq.*truncate-lines" in the Emacs tree, while there's
three calls to `toggle-truncate-lines' (and all are from code that are
user oriented and should message).

So I agree with Stefan -- altering `toggle-truncate-lines' like
suggested isn't appropriate, and I'm closing this bug report.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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