[Top][All Lists]

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

Re: C/C++ mode feature I badly want... (non-persistent indentation)

From: Tassilo Horn
Subject: Re: C/C++ mode feature I badly want... (non-persistent indentation)
Date: Wed, 14 Nov 2012 12:50:48 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Tom <address@hidden> writes:

> It does not seem too dificult and I imagine lots of people woould find
> it useful. It really does seem like a useful idea.

It would only be useful if all developers in the project used emacs with
non-persistent indentation.  Else, the people not using it would still
need to reindent the code to make any rhyme of it.

And then, of course the repository browsers (ViewCVS/SVN, Github, etc)
or more correctly, their source-to-html transformations, should also
display this synthetic indentation...  IMHO, that sounds like a can of
worms.  And of course, it wouldn't work for languages where whitespace
has semantics like python and haskell.

FWIW, org-mode does have some feature like that.  You might want to have
a look.

,----[ C-h f org-indent-mode RET ]
| org-indent-mode is an interactive autoloaded Lisp function in `org-indent.el'.
| (org-indent-mode &optional ARG)
| When active, indent text according to outline structure.
| Internally this works by adding `line-prefix' and `wrap-prefix'
| properties, after each buffer modification, on the modified zone.
| The process is synchronous.  Though, initial indentation of
| buffer, which can take a few seconds on large buffers, is done
| during idle time.


reply via email to

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