summaryrefslogtreecommitdiffstats
path: root/kate
diff options
context:
space:
mode:
Diffstat (limited to 'kate')
-rw-r--r--kate/data/Makefile.am6
-rw-r--r--kate/interfaces/Makefile.am2
-rw-r--r--kate/part/Makefile.am2
-rw-r--r--kate/part/katesearch.cpp32
-rw-r--r--kate/plugins/insertfile/Makefile.am2
-rw-r--r--kate/plugins/isearch/Makefile.am2
-rw-r--r--kate/plugins/kdatatool/Makefile.am2
-rw-r--r--kate/plugins/wordcompletion/Makefile.am2
8 files changed, 33 insertions, 17 deletions
diff --git a/kate/data/Makefile.am b/kate/data/Makefile.am
index da5febd95..720d9007d 100644
--- a/kate/data/Makefile.am
+++ b/kate/data/Makefile.am
@@ -19,7 +19,11 @@ syntaxkate_DATA = language.dtd syntax.template cpp.xml c.xml html.xml kbasic.xml
cg.xml html-php.xml css-php.xml javascript-php.xml ahdl.xml ansic89.xml tibasic.xml \
purebasic.xml mips.xml logtalk.xml txt2tags.xml xslt.xml stata.xml glsl.xml \
lilypond.xml abc.xml asp.xml asm-avr.xml rib.xml cmake.xml octave.xml javadoc.xml cgis.xml \
- spice.xml nasm.xml mediawiki.xml apache.xml m3u.xml ini.xml fstab.xml actionscript.xml
+ spice.xml nasm.xml mediawiki.xml apache.xml m3u.xml ini.xml fstab.xml actionscript.xml \
+ abap.xml ansys.xml asn1.xml asterisk.xml bmethod.xml ddoc.xml djangotemplate.xml \
+ doxygenlua.xml dtd.xml email.xml erlang.xml freebasic.xml gap.xml json.xml maxima.xml \
+ mergetagtext.xml modelica.xml monobasic.xml nemerle.xml noweb.xml objectivecpp.xml opal.xml \
+ pgn.xml rapidq.xml scala.xml sisu.xml systemc.xml texinfo.xml xorg.xml xul.xml yaml.xml zonnon.xml
partrcdir = $(kde_confdir)
partrc_DATA = katesyntaxhighlightingrc katefiletyperc
diff --git a/kate/interfaces/Makefile.am b/kate/interfaces/Makefile.am
index 175dcf381..9520fa750 100644
--- a/kate/interfaces/Makefile.am
+++ b/kate/interfaces/Makefile.am
@@ -3,7 +3,7 @@ METASOURCES = document.moc view.moc
lib_LTLIBRARIES = libkatepartinterfaces.la
libkatepartinterfaces_la_SOURCES = interfaces.cpp katecmd.cpp
-libkatepartinterfaces_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la
+libkatepartinterfaces_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la $(LIB_QT) $(LIB_KDEUI) $(LIB_KPARTS) $(LIB_KDECORE)
libkatepartinterfaces_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined
kateinclude_HEADERS = document.h view.h
diff --git a/kate/part/Makefile.am b/kate/part/Makefile.am
index 4a182452e..9be7a9e6d 100644
--- a/kate/part/Makefile.am
+++ b/kate/part/Makefile.am
@@ -16,7 +16,7 @@ libkate_la_SOURCES = katesearch.cpp katebuffer.cpp katecmds.cpp \
libkatepart_la_SOURCES = dummy.cpp
-libkatepart_la_LIBADD = libkate.la ../interfaces/libkatepartinterfaces.la $(top_builddir)/kdeprint/libkdeprint.la $(top_builddir)/kutils/libkutils.la $(top_builddir)/kjs/libkjs.la $(LUA_LIBS)
+libkatepart_la_LIBADD = libkate.la ../interfaces/libkatepartinterfaces.la $(LIB_KDEPRINT) $(top_builddir)/kutils/libkutils.la $(top_builddir)/kjs/libkjs.la $(LUA_LIBS) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KPARTS) $(top_builddir)/interfaces/ktexteditor/libktexteditor.la $(LIB_KFILE) $(top_builddir)/dcop/libDCOP.la
libkatepart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp
index 8f4911137..96f5128b0 100644
--- a/kate/part/katesearch.cpp
+++ b/kate/part/katesearch.cpp
@@ -377,23 +377,35 @@ void KateSearch::replaceOne()
{
QString replaceWith = m_replacement;
if ( s.flags.regExp && s.flags.useBackRefs ) {
- // replace each "(?!\)\d+" with the corresponding capture
- QRegExp br("\\\\(\\d+)");
+ // Replace each "\0"..."\9" with the corresponding capture,
+ // "\n" and "\t" with newline and tab,
+ // "\\" with "\",
+ // and remove the "\" for any other sequence.
+ QRegExp br("\\\\(.)");
int pos = br.search( replaceWith );
int ncaps = m_re.numCaptures();
while ( pos >= 0 ) {
- QString sc;
- if ( !pos || replaceWith.at( pos-1) != '\\' ) {
- int ccap = br.cap(1).toInt();
+ QString substitute;
+ QChar argument = br.cap(1).at(0);
+ if ( argument.isDigit() ) {
+ // the second character is a digit, this is a backreference
+ int ccap = argument.digitValue();
if (ccap <= ncaps ) {
- sc = m_re.cap( ccap );
- replaceWith.replace( pos, br.matchedLength(), sc );
- }
- else {
+ substitute = m_re.cap( ccap );
+ } else {
kdDebug()<<"KateSearch::replaceOne(): you don't have "<<ccap<<" backreferences in regexp '"<<m_re.pattern()<<"'"<<endl;
+ break;
}
+ } else if ( argument == 'n' ) {
+ substitute = '\n';
+ } else if ( argument == 't' ) {
+ substitute = '\t';
+ } else {
+ // handle a validly escaped backslash, or an invalid escape.
+ substitute = argument;
}
- pos = br.search( replaceWith, pos + (int)sc.length() );
+ replaceWith.replace( pos, br.matchedLength(), substitute );
+ pos = br.search( replaceWith, pos + substitute.length() );
}
}
diff --git a/kate/plugins/insertfile/Makefile.am b/kate/plugins/insertfile/Makefile.am
index 783e93e0f..b9a4981ae 100644
--- a/kate/plugins/insertfile/Makefile.am
+++ b/kate/plugins/insertfile/Makefile.am
@@ -5,7 +5,7 @@ METASOURCES = AUTO
kde_module_LTLIBRARIES = ktexteditor_insertfile.la
ktexteditor_insertfile_la_SOURCES = insertfileplugin.cpp
-ktexteditor_insertfile_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la
+ktexteditor_insertfile_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la $(LIB_QT) $(LIB_KDECORE) $(LIB_KFILE) $(LIB_KDEUI)
ktexteditor_insertfile_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
insertfiledatadir = $(kde_datadir)/ktexteditor_insertfile
diff --git a/kate/plugins/isearch/Makefile.am b/kate/plugins/isearch/Makefile.am
index 70327218e..3e630a0c7 100644
--- a/kate/plugins/isearch/Makefile.am
+++ b/kate/plugins/isearch/Makefile.am
@@ -5,7 +5,7 @@ METASOURCES = AUTO
kde_module_LTLIBRARIES = ktexteditor_isearch.la
ktexteditor_isearch_la_SOURCES = ISearchPlugin.cpp
-ktexteditor_isearch_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la
+ktexteditor_isearch_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI)
ktexteditor_isearch_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
isearchdatadir = $(kde_datadir)/ktexteditor_isearch
diff --git a/kate/plugins/kdatatool/Makefile.am b/kate/plugins/kdatatool/Makefile.am
index 115391ada..02aaff789 100644
--- a/kate/plugins/kdatatool/Makefile.am
+++ b/kate/plugins/kdatatool/Makefile.am
@@ -5,7 +5,7 @@ METASOURCES = AUTO
kde_module_LTLIBRARIES = ktexteditor_kdatatool.la
ktexteditor_kdatatool_la_SOURCES = kate_kdatatool.cpp
-ktexteditor_kdatatool_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la
+ktexteditor_kdatatool_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la $(LIB_QT) $(LIB_KDECORE) $(LIB_KFILE) $(LIB_KDEUI)
ktexteditor_kdatatool_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
kdatatooldatadir = $(kde_datadir)/ktexteditor_kdatatool
diff --git a/kate/plugins/wordcompletion/Makefile.am b/kate/plugins/wordcompletion/Makefile.am
index 5bddb895e..3dcab0ffd 100644
--- a/kate/plugins/wordcompletion/Makefile.am
+++ b/kate/plugins/wordcompletion/Makefile.am
@@ -5,7 +5,7 @@ METASOURCES = AUTO
kde_module_LTLIBRARIES = ktexteditor_docwordcompletion.la
ktexteditor_docwordcompletion_la_SOURCES = docwordcompletion.cpp
-ktexteditor_docwordcompletion_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la
+ktexteditor_docwordcompletion_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI)
ktexteditor_docwordcompletion_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
docwordcompletiondatadir = $(kde_datadir)/ktexteditor_docwordcompletion