From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: 16770@debbugs.gnu.org
Subject: bug#16770: Erroneous interaction between electric-indent-mode and electric-indent-local-mode
Date: Tue, 18 Feb 2014 13:26:56 -0500 [thread overview]
Message-ID: <jwvbny4jnca.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <20140216171214.GB3058@acm.acm> (Alan Mackenzie's message of "Sun, 16 Feb 2014 17:12:14 +0000")
> 1. Start emacs -Q.
> 2. Visit, successively, two random buffers foo and bar.
> 3. In buffer foo, do M-x electric-indent-local-mode.
> 4. In buffer bar, do M-x electric-indent-mode.
> Both buffers now have e-i-mode disabled.
> 5. Still in buffer bar, do M-x electric-indent-mode.
> This, being a global mode, should enable e-i-mode in all buffers. But
> in buffer foo, electric-indent-mode remains disabled. This is a bug.
Actually, upon further consideration, I don't think this one is a bug.
The behavior you want would make sense, but the current one also
makes sense. At step 3 the user specifically requested to disable
electric-indent in `foo' so changing the global setting should not
affect it.
So the real problem is that electric-indent-local-mode is not consistent
in this regard (it sometimes remembers a local setting even if it's
equal to the global setting, and sometimes treats a local setting equal
to the global setting as meaning "obey the global setting").
Worse:
(electric-indent-mode -1)
(electric-indent-local-mode 1)
(electric-indent-mode 1)
(electric-indent-mode -1)
leaves us with a buffer where electric-indent-mode is locally t but
there is no electric indentation.
Stefan
next prev parent reply other threads:[~2014-02-18 18:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 17:12 bug#16770: Erroneous interaction between electric-indent-mode and electric-indent-local-mode Alan Mackenzie
2014-02-18 16:40 ` Stefan Monnier
2014-02-18 18:26 ` Stefan Monnier [this message]
2014-03-20 18:09 ` Stefan
2016-02-05 20:10 ` Glenn Morris
2019-09-30 4:00 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvbny4jnca.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=16770@debbugs.gnu.org \
--cc=acm@muc.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.