emacs-devel
[Top][All Lists]
Advanced

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

Re: Should mode commands be idempotent?


From: John Wiegley
Subject: Re: Should mode commands be idempotent?
Date: Tue, 26 Sep 2017 11:01:51 -0700
User-agent: Gnus/5.130016 (Ma Gnus v0.16) Emacs/26.0 (darwin)

>>>>> Drew Adams <address@hidden> writes:

>> FWIW, I can't off the top of my head think of a reason why (foo-mode 1)
>> followed by (foo-mode 1) should do something different than just calling it
>> once.

> Just what do you have in mind, for the meaning here of "do something
> different"? Are we saying that the state of the Emacs session after the
> second call should be identical to the state after the first call? Just what
> kind of "identical" would be meant?

Yes, idempotence: calling it N times is the exact same as calling it once.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



reply via email to

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