[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Should mode commands be idempotent?
From: |
Drew Adams |
Subject: |
RE: Should mode commands be idempotent? |
Date: |
Fri, 22 Sep 2017 08:54:23 -0700 (PDT) |
> Users expect major modes to be idempotent. Any time one is not, it
> will cause them surprises. We should treat that as a bug and fix it
> to be idempotent.
Yes. You're talking about code distributed with Emacs, no doubt.
And any 3rd-party library (if there were any) that might have
such a mode function would be well advised to make clear to its
users that the function is not idempotent, and explain why:
what to expect and why.
> As for minor modes, it has been pointed out (by Stefan?) that multiple
> hooks could enable the same major mode, and the result should be the
> same as if just one hook did so.
My question for this thread is this:
Is this proposal (add an explicit rule or convention stating
that mode functions should be idempotent) a solution looking
for a problem?
Has someone actually reported a problem that s?he ran into by
encountering an actual mode function that was not idempotent?
- Re: Should mode commands be idempotent?, (continued)
RE: Should mode commands be idempotent?, Drew Adams, 2017/09/19
- Re: Should mode commands be idempotent?, Stefan Monnier, 2017/09/19
- RE: Should mode commands be idempotent?, Drew Adams, 2017/09/20
- Re: Should mode commands be idempotent?, Stefan Monnier, 2017/09/20
- RE: Should mode commands be idempotent?, Drew Adams, 2017/09/21
- Re: Should mode commands be idempotent?, Richard Stallman, 2017/09/21
- RE: Should mode commands be idempotent?,
Drew Adams <=
- Re: Should mode commands be idempotent?, Richard Stallman, 2017/09/22
- RE: Should mode commands be idempotent?, Drew Adams, 2017/09/24
- Re: Should mode commands be idempotent?, Richard Stallman, 2017/09/25
Re: Should mode commands be idempotent?, Clément Pit-Claudel, 2017/09/23
RE: Should mode commands be idempotent?, Drew Adams, 2017/09/24
Re: Should mode commands be idempotent?, Clément Pit-Claudel, 2017/09/25
RE: Should mode commands be idempotent?, Drew Adams, 2017/09/25
Re: Should mode commands be idempotent?, Stefan Monnier, 2017/09/25
Re: Should mode commands be idempotent?, John Wiegley, 2017/09/25
RE: Should mode commands be idempotent?, Drew Adams, 2017/09/26