[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC
From: |
Alan Mackenzie |
Subject: |
Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478. |
Date: |
Sun, 2 Mar 2014 11:51:18 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello, Stefan.
On Sat, Mar 01, 2014 at 10:57:34AM -0500, Stefan Monnier wrote:
> >> > The other bit takes over the value of c-electric-indent-mode into CC
> >> > Mode only when it has been set by the user, thus preventing
> >> > electric.el's default overriding CC Mode's.
> >> For that I think it's better to only obey electric-indent-mode if
> >> Emacs>24.3 rather than use the electric-indent-mode-has-been-called crutch.
Using version numbers to check for features is not exactly clean coding.
> > That does not achieve the same effect.
> Can you give a scenario where the result is different?
The default for electric-indent-mode is changed in a future Emacs
version.
> > Please don't do this. I meant literally what I wrote.
> Yes, but I hate this electric-indent-mode-has-been-called crutch, so we
> need a different solution.
> > A better solution would be to provide a less ugly way of checking whether
> > a user has called electric-indent-mode
> A different way would still be ugly, because this requirement is itself
> ugly. We need to find a solution that does not depend on *how* we got
> to this state.
By "this state" you mean what? The minor mode electric-indent-mode can
be in any of three states: (i) left at its default, (ii) set (or toggled)
to t, (iii) set (or toggled) to nil.
The challenge is to distinguish between (i) and ((ii) or (iii)).
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan Monnier, 2014/03/01
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478.,
Alan Mackenzie <=
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan Monnier, 2014/03/03
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Alan Mackenzie, 2014/03/08
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan Monnier, 2014/03/08
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Alan Mackenzie, 2014/03/09
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan Monnier, 2014/03/09
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Glenn Morris, 2014/03/10
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., João Távora, 2014/03/10
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan Monnier, 2014/03/10
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Alan Mackenzie, 2014/03/16
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan, 2014/03/17