[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Making line prefixes invisible to a mode?
From: |
Raffaele Ricciardi |
Subject: |
Making line prefixes invisible to a mode? |
Date: |
Fri, 05 Jul 2013 21:55:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
Hello everyone,
Emacs supports multiple major modes by means of indirect buffers. This
feature is useful - among other things - to edit comments in source
code. However, when editing a block of line-comments, the
line-comment prefix is seen by the alternative major mode as a part of
the buffer (unless such mode is a specialized mode, of course).
Narrowing can't work, either, because you can't narrow to a rectangle,
can you? Therefore, is it possible to make a mode "believe" that each
line starts after the line comment prefix?
I have an alternative solution in mind*, but I'd like to know whether
a direct way to achieve this is available.
Thank you.
*: Such solution would involve narrowing to a comment block and then
stripping the line prefix, only to add it again before widening.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Making line prefixes invisible to a mode?,
Raffaele Ricciardi <=