Revision 827774

Go back to digest for 6th July 2008

Other in KDE Base

Robin Pedersen committed changes in /trunk/KDE/kdelibs/kate:

Merge branches/kate/scripting_api_updates

Summary of changes:

An indenter can specify a "required style" in the header, telling that it depends on a highlighting schema that provides this "style".

E.g. the Ruby indenter depends on attributes that are specific to the ruby highlighting schema.
This dependency is enforced by setting "ruby" as the required style in the indenter, and "ruby" as the provided style in the highlighter.

Because of these parameters, the ruby indenter is available only when the ruby highlighter is active.
This prevents "undefined behavior" caused by using the indenter without the expected highlighting schema.

The other change allows an indenter to return an "alignment" column in addition to the indent level.
This makes it possible to use tabs for indent, and spaces for things like aligning parameter lists, so that the tabs width can be changed without messing up the alignment.

Some refer to this kind of indenting as "mixed mode".

(A possible argument for calling this a "bugfix" is that it makes it possible to resolve some "hacks" and "todos" that have existed only because this feature wasn't supported)

File Changes

Modified 15 files
  • /trunk/KDE/kdelibs/kate
  •   /document/katedocument.cpp
  •   /script/kateindentscript.cpp
  •   /script/kateindentscript.h
  •   /script/katescript.h
  •   /script/katescriptmanager.cpp
  •   /syntax/katehighlight.cpp
  •   /syntax/katehighlight.h
  •   /syntax/katesyntaxdocument.cpp
  •   /syntax/katesyntaxdocument.h
  •   /utils/kateautoindent.cpp
  •   /utils/kateautoindent.h
  •   /script/data/indentation_template.js
  •   /script/data/ruby.js
  •   /syntax/data/language.dtd
  •   /syntax/data/ruby.xml
15 files changed in total