emacs-devel
[Top][All Lists]
Advanced

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

Re: master ac6b62b: * lisp/time.el (world-clock-mode): Make non-interact


From: Stefan Kangas
Subject: Re: master ac6b62b: * lisp/time.el (world-clock-mode): Make non-interactive.
Date: Fri, 23 Apr 2021 09:22:29 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>>     * lisp/time.el (world-clock-mode): Make non-interactive.
>> ---
>>  lisp/time.el | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/lisp/time.el b/lisp/time.el
>> index 5abc6e9..fd53f63 100644
>> --- a/lisp/time.el
>> +++ b/lisp/time.el
>> @@ -534,6 +534,7 @@ If the value is t instead of an alist, use the value of
>>  (define-derived-mode world-clock-mode special-mode "World clock"
>>    "Major mode for buffer that displays times in various time zones.
>>  See `world-clock'."
>> +  :interactive nil
>>    (setq-local revert-buffer-function #'world-clock-update)
>>    (setq show-trailing-whitespace nil))
>
> Stefan, can you give your rationale for the change?  Why should user
> be unable to invoke this mode interactively, when they could do so for
> a long time?

This mode is only useful in a buffer prepared for its use by
`world-clock'.  Running it in an arbitrary buffer will silently fail.

That was the use-case for which the :interactive parameter was added:

     ‘:interactive’
          Modes are interactive commands by default.  If you specify a
          ‘nil’ value, the mode defined here won’t be interactive.  This
          is useful for modes that are never meant to be activated by
          users manually, but are only supposed to be used in some
          specially-formatted buffer.

> And in any case, why isn't that change in NEWS?

I don't see any particular need to put this in NEWS, as no one is likely
to have been running this command on purpose.



reply via email to

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