From: Tom <adatgyujto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: C/C++ mode feature I badly want... (non-persistent indentation)
Date: Wed, 14 Nov 2012 11:18:18 +0000 (UTC) [thread overview]
Message-ID: <loom.20121114T121034-141@post.gmane.org> (raw)
In-Reply-To: 1352849552.67331.YahooMailNeo@web121305.mail.ne1.yahoo.com
S Boucher <stbya <at> yahoo.com> writes:
>
> instead of actually changing the buffer, it would put a display property
> over the leading white spaces, where the text in the property corresponds
> to the correct indentation.
If you know some elisp then it's not hard to create a simple solution for
this. The elisp would reindent the whole buffer for each new file it
encounters, but it would not save it, just check where the whitespace
at the beginning of lines differs from the original file and then revert
the reindentation and add the display properties as necessary.
It should cache this whitespace info for each file, so if the same file
is encountered then its indentation could be fixed quickly using the
cached information. Cache validity could be tested by comparing cache
date to the file modification and if the file changes then its cache
info would be updated.
It does not seem too dificult and I imagine lots of people woould find
it useful. It really does seem like a useful idea.
next prev parent reply other threads:[~2012-11-14 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 23:32 C/C++ mode feature I badly want... (non-persistent indentation) S Boucher
2012-11-14 11:18 ` Tom [this message]
2012-11-14 11:50 ` Tassilo Horn
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=loom.20121114T121034-141@post.gmane.org \
--to=adatgyujto@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.