HTML mode: Change words that cause indention
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
HTML mode: Change words that cause indention         


Author: Florian.Lindner
Date: Jul 4, 2008 12:57

Hello,
I'm using a simple template language that is embedded in HTML. Can I
change the words that cause an indention in Emacs HTML mode? For
example: indent after {%% for whatever in whatever %%} and unindent {%%
endfor %%}.

Is that possible?

BTW: It's the Django template language: http://www.djangoproject.com/documentation/templates/

Thanks,

Florian
3 Comments
Re: HTML mode: Change words that cause indention         


Author: Volkan YAZICI
Date: Jul 4, 2008 23:14

On Jul 4, 10:57 pm, Florian.Lind...@xgm.de wrote:
> Hello,
> I'm using a simple template language that is embedded in HTML. Can I
> change the words that cause an indention in Emacs HTML mode? For
> example: indent after {%% for whatever in whatever %%} and unindent {%%
> endfor %%}.

See `sgml-indent-line' and `sgml-calculate-indent' functions in lisp/
textmodes/sgml-mode.el in the emacs source tree. Also, a rough look at
the whole of the sgml-mode.el will give your a clear idea. You can add
your customized indentation routines as a minor mode hooked into sgml-
mode.

Regards.
no comments
Re: HTML mode: Change words that cause indention         


Author: Florian.Lindner
Date: Jul 9, 2008 04:48

On 5 Jul., 08:14, Volkan YAZICI gmail.com> wrote:
> On Jul 4, 10:57 pm, Florian.Lind...@xgm.de wrote:
>
>> Hello,
>> I'm using a simple template language that is embedded in HTML. Can I
>> change the words that cause an indention in Emacs HTML mode? For
>> example: indent after {%% for whatever in whatever %%} and unindent {%%
>> endfor %%}.
>
> See `sgml-indent-line' and `sgml-calculate-indent' functions in lisp/
> textmodes/sgml-mode.el in the emacs source tree. Also, a rough look at
> the whole of the sgml-mode.el will give your a clear idea. You can add
> your customized indentation routines as a minor mode hooked into sgml-
> mode.

Ok, that sound like it is far beyond my knowledge... ;-)
1 Comment
Re: HTML mode: Change words that cause indention         


Author: Lennart Borgman (gmail)
Date: Jul 9, 2008 07:11

Florian.Lindner@xgm.de wrote:
> On 5 Jul., 08:14, Volkan YAZICI gmail.com> wrote:
>> On Jul 4, 10:57 pm, Florian.Lind...@xgm.de wrote:
>>
>>> Hello,
>>> I'm using a simple template language that is embedded in HTML. Can I
>>> change the words that cause an indention in Emacs HTML mode? For
>>> example: indent after {%% for whatever in whatever %%} and unindent {%%
>>> endfor %%}.
>> See `sgml-indent-line' and `sgml-calculate-indent' functions in lisp/
>> textmodes/sgml-mode.el in the emacs source tree. Also, a rough look at
>> the whole of the sgml-mode.el will give your a clear idea. You can add
>> your customized indentation routines as a minor mode hooked into sgml-
>> mode.
>
> Ok, that sound like it is far beyond my knowledge... ;-)

Hi Florian,
Show full article (1.12Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Re: gnu indent: how to avoid extra indent?comp.lang.c ·
Re: reindent-then-newline-and-indent doesn't indent properly in emacs 22.1gnu.emacs.bug ·