[Top][All Lists]

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

Re: Should mode commands be idempotent?

From: Clément Pit-Claudel
Subject: Re: Should mode commands be idempotent?
Date: Mon, 25 Sep 2017 09:03:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 2017-09-24 19:26, Drew Adams wrote:
>>> Has someone actually reported a problem that s?he ran into by
>>> encountering an actual mode function that was not idempotent?
>> I think I mentioned visual-line-mode; the fact that it's not
>> idempotent is a concrete (though minor) problem for me.  I enable
>> it in a hook, and a major mode that I use enables it too.  Due to
>> the way visual-line-mode works, disabling it after this doesn't
>> restore my original settings.
> That Emacs chooses to have its distributed modes be idempotent
> is one thing.  That some 3rd-party code might also mistakenly
> (unintentionally) prove to be non-idempotent is another, but
> similar thing.  Such cases represent things to fix.
> That is different from establishing a convention that
> modes should never, intentionally or unintentionally,
> be non-idempotent.

Yes, of course; you asked whether non-idempotence had ever been an issue for 
anyone; I gave you one example :)

reply via email to

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