Hello community,

here is the log from the commit of package tilde for openSUSE:Factory checked 
in at 2017-08-24 18:47:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tilde (Old)
 and      /work/SRC/openSUSE:Factory/.tilde.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tilde"

Thu Aug 24 18:47:42 2017 rev:6 rq:515080 version:0.3.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/tilde/tilde.changes      2015-02-20 
12:01:51.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.tilde.new/tilde.changes 2017-08-24 
18:48:00.386529258 +0200
@@ -1,0 +2,8 @@
+Mon Aug  7 19:00:36 UTC 2017 - [email protected]
+
+- Update to new upstream release 0.3.7
+  * Resolve crashes that happened on program exit
+  * Add a "toggle comment" functionality.
+  * Several problems with syntax highlighting were fixed.
+
+-------------------------------------------------------------------

Old:
----
  tilde-0.3.4.tar.bz2

New:
----
  tilde-0.3.7.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tilde.spec ++++++
--- /var/tmp/diff_new_pack.9QyIXb/_old  2017-08-24 18:48:01.958307946 +0200
+++ /var/tmp/diff_new_pack.9QyIXb/_new  2017-08-24 18:48:01.962307382 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package tilde
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           tilde
-Version:        0.3.4
+Version:        0.3.7
 Release:        0
 Summary:        An intuitive text editor for the terminal
 License:        GPL-3.0
@@ -35,10 +35,9 @@
 BuildRequires:  libunistring-devel
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(libt3config) >= 0.2.6
-BuildRequires:  pkgconfig(libt3highlight) >= 0.2.1
-BuildRequires:  pkgconfig(libt3widget) >= 0.2.0
+BuildRequires:  pkgconfig(libt3highlight) >= 0.4.0
+BuildRequires:  pkgconfig(libt3widget) >= 0.5.0
 BuildRequires:  pkgconfig(libtranscript) >= 0.2.0
-BuildRequires:  pkgconfig(sigc++-2.0)
 
 %description
 Tilde is a text editor for the console/terminal, which provides an
@@ -63,6 +62,7 @@
 %defattr(-,root,root)
 %_bindir/tilde
 %_docdir/%name/
+%_datadir/%name/
 %_mandir/man1/tilde.1*
 %doc COPYING
 

++++++ tilde-0.3.4.tar.bz2 -> tilde-0.3.7.tar.bz2 ++++++
++++ 1713 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/Changelog new/tilde-0.3.7/Changelog
--- old/tilde-0.3.4/Changelog   2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/Changelog   2016-02-23 08:20:17.000000000 +0100
@@ -1,5 +1,27 @@
+Version 0.3.7:
+    Bug fixes:
+    - Make the dialogs for stepped actions (save, load, quit) abort when the
+      user closes the dialog by using the escape key. Failing to do so would
+      result in failure to reset the terminal and random crashes.
+
+Version 0.3.6:
+    Re-release of version 0.3.5 to fix build problems.
+
+Version 0.3.5:
+    New features:
+    - Added "toggle line comment" functionality.
+
+    Bug fixes:
+    - When the syntax highlighting changes through saving the file under a new
+      name, the screen is now correctly updated.
+    - Syntax highlighting is now changed when a file is saved under a new name.
+    - Reading in background colors from the configuration file did not work
+      for most colors.
+    - Better handling of several signals, ensuring that the terminal won't be
+      left in an unusable state.
+
 Version 0.3.4:
-    Re-release of version 0.3.4 to update the configure script.
+    Re-release of version 0.3.3 to update the configure script.
 
 Version 0.3.3:
     Bug fixes:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/config.pkg new/tilde-0.3.7/config.pkg
--- old/tilde-0.3.4/config.pkg  2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/config.pkg  2016-02-23 08:20:17.000000000 +0100
@@ -45,7 +45,12 @@
        checkfunction_internal test_compile_cxx "$@"
 }
 
+test_link_cxx_with_flags() {
+       test_link_cxx "$@" "CXXFLAGS=$CXXFLAGS"
+}
+
 config() {
+       has_support_cxx11
        clean_cxx
        cat > .configcxx.cc <<EOF
 #include <transcript/transcript.h>
@@ -82,7 +87,7 @@
        return 0;
 }
 EOF
-       pkgconfig libt3widget/0.2.0 LIBT3WIDGET test_link_cxx || \
+       pkgconfig libt3widget/0.5.0 LIBT3WIDGET test_link_cxx_with_flags || \
                error "!! Can not find libt3widget. libt3widget is required to 
compile tilde."
 
        clean_cxx
@@ -106,7 +111,7 @@
        return 0;
 }
 EOF
-       pkgconfig libt3highlight/0.2.1 LIBT3HIGHLIGHT test_link_cxx || \
+       pkgconfig libt3highlight/0.4.0 LIBT3HIGHLIGHT test_link_cxx || \
                error "!! Can not find libt3highlight. libt3highlight is 
required to compile tilde."
 
        clean_cxx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/man/tilde.1 new/tilde-0.3.7/man/tilde.1
--- old/tilde-0.3.4/man/tilde.1 2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/man/tilde.1 2016-02-23 08:20:17.000000000 +0100
@@ -1,5 +1,5 @@
 .\" Generated by manscript from tilde.1.txt
-.TH "TILDE" "1" "2013/06/08" "0.3.4" "An intuitive terminal text editor"
+.TH "TILDE" "1" "2013/06/08" "0.3.7" "An intuitive terminal text editor"
 .SH NAME
 tilde \- an intuitive text editor for the console/terminal
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/action.h new/tilde-0.3.7/src/action.h
--- old/tilde-0.3.4/src/action.h        2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/action.h        2016-02-23 08:20:17.000000000 +0100
@@ -63,6 +63,7 @@
        TOOLS_HIGHLIGHTING,
        TOOLS_STRIP_SPACES,
        TOOLS_AUTOCOMPLETE,
+       TOOLS_TOGGLE_LINE_COMMENT,
 );
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/base.config new/tilde-0.3.7/src/base.config
--- old/tilde-0.3.4/src/base.config     1970-01-01 01:00:00.000000000 +0100
+++ new/tilde-0.3.7/src/base.config     2016-02-23 08:20:17.000000000 +0100
@@ -0,0 +1,45 @@
+config_version = 1
+%lang {
+       name = "C++"
+       line_comment = "//"
+}
+%lang {
+       name = "C"
+       line_comment = "//"
+}
+%lang {
+       name = "LLgen"
+       line_comment = "//"
+}
+%lang {
+       name = "Java"
+       line_comment = "//"
+}
+%lang {
+       name = "Shell"
+       line_comment = "#"
+}
+%lang {
+       name = "Python"
+       line_comment = "#"
+}
+%lang {
+       name = "Python 3"
+       line_comment = "#"
+}
+%lang {
+       name = "Perl"
+       line_comment = "#"
+}
+%lang {
+       name = "JavaScript"
+       line_comment = "//"
+}
+%lang {
+       name = "T3 Highlight Language Definition"
+       line_comment = "#"
+}
+%lang {
+       name = "Makefile"
+       line_comment = "#"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/base_config.bytes new/tilde-0.3.7/src/base_config.bytes
--- old/tilde-0.3.4/src/base_config.bytes       1970-01-01 01:00:00.000000000 
+0100
+++ new/tilde-0.3.7/src/base_config.bytes       2016-02-23 08:20:17.000000000 
+0100
@@ -0,0 +1,19 @@
+ 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x7b, 0x0a, 0x6c, 0x61, 0x6e, 0x67, 0x5f, 
0x64, 0x65, 0x73,
+ 0x63, 0x20, 0x7b, 0x0a, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x73, 
0x65, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x22, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2d, 
0x6b, 0x65, 0x79,
+ 0x73, 0x20, 0x7b, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x7b, 0x20, 0x74, 0x79, 
0x70, 0x65, 0x20,
+ 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x7d, 0x0a, 
0x6c, 0x69, 0x6e,
+ 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x7b, 0x20, 0x74, 
0x79, 0x70, 0x65,
+ 0x20, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x7d, 
0x0a, 0x7d, 0x0a,
+ 0x69, 0x74, 0x65, 0x6d, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x22, 
0x61, 0x6e, 0x79,
+ 0x22, 0x0a, 0x25, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 
0x20, 0x3d, 0x20,
+ 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0a, 0x7d, 0x0a, 0x7d, 0x0a, 0x61, 0x6c, 
0x6c, 0x6f, 0x77,
+ 0x65, 0x64, 0x2d, 0x6b, 0x65, 0x79, 0x73, 0x20, 0x7b, 0x0a, 0x63, 0x6f, 0x6e, 
0x66, 0x69, 0x67,
+ 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x74, 0x79, 
0x70, 0x65, 0x20,
+ 0x3d, 0x20, 0x22, 0x69, 0x6e, 0x74, 0x22, 0x0a, 0x7d, 0x0a, 0x6c, 0x61, 0x6e, 
0x67, 0x20, 0x7b,
+ 0x0a, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x6c, 0x69, 0x73, 0x74, 
0x22, 0x0a, 0x69,
+ 0x74, 0x65, 0x6d, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x6c, 
0x61, 0x6e, 0x67,
+ 0x5f, 0x64, 0x65, 0x73, 0x63, 0x22, 0x0a, 0x7d, 0x0a, 0x7d, 0x0a, 0x69, 0x74, 
0x65, 0x6d, 0x2d,
+ 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x61, 0x6e, 0x79, 0x22, 0x0a, 
0x25, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x63, 
0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 
0x31, 0x22, 0x0a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/base_config.schema new/tilde-0.3.7/src/base_config.schema
--- old/tilde-0.3.4/src/base_config.schema      1970-01-01 01:00:00.000000000 
+0100
+++ new/tilde-0.3.7/src/base_config.schema      2016-02-23 08:20:17.000000000 
+0100
@@ -0,0 +1,38 @@
+# Copyright (C) 2015 G.P. Halkes
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3, as
+# published by the Free Software Foundation.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+types {
+       lang_desc {
+               type = "section"
+               allowed-keys {
+                       name { type = "string" }
+                       line_comment { type = "string" }
+               }
+               item-type = "any"
+               %constraint = "name"
+       }
+}
+
+allowed-keys {
+       config_version {
+               type = "int"
+       }
+
+       lang {
+               type = "list"
+               item-type = "lang_desc"
+       }
+}
+item-type = "any"
+
+%constraint = "config_version = 1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/dialogs/attributesdialog.cc 
new/tilde-0.3.7/src/dialogs/attributesdialog.cc
--- old/tilde-0.3.4/src/dialogs/attributesdialog.cc     2015-02-12 
08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/dialogs/attributesdialog.cc     2016-02-23 
08:20:17.000000000 +0100
@@ -21,8 +21,8 @@
        widget_group->set_size(widget_count, width - 4); \
        var = new expander_t(name); \
        var->set_child(widget_group); \
-       var->connect_move_focus_up(sigc::mem_fun(this, 
&attributes_dialog_t::focus_previous)); \
-       var->connect_move_focus_down(sigc::mem_fun(this, 
&attributes_dialog_t::focus_next)); \
+       var->connect_move_focus_up(signals::mem_fun(this, 
&attributes_dialog_t::focus_previous)); \
+       var->connect_move_focus_down(signals::mem_fun(this, 
&attributes_dialog_t::focus_next)); \
        expander_group->add_expander(var); \
 }
 
@@ -33,9 +33,9 @@
        change_button = new button_t("Change"); \
        change_button->set_anchor(widget_group, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT)); \
        change_button->set_position(widget_count, 0); \
-       change_button->connect_activate(sigc::bind(sigc::mem_fun(this, 
&attributes_dialog_t::change_button_activated), sym)); \
-       change_button->connect_move_focus_up(sigc::mem_fun(widget_group, 
&widget_group_t::focus_previous)); \
-       change_button->connect_move_focus_down(sigc::mem_fun(widget_group, 
&widget_group_t::focus_next)); \
+       change_button->connect_activate(signals::bind(signals::mem_fun(this, 
&attributes_dialog_t::change_button_activated), sym)); \
+       change_button->connect_move_focus_up(signals::mem_fun(widget_group, 
&widget_group_t::focus_previous)); \
+       change_button->connect_move_focus_down(signals::mem_fun(widget_group, 
&widget_group_t::focus_next)); \
        widget_group->add_child(change_button); \
        widget_name = new attribute_test_line_t(); \
        widget_name->set_anchor(change_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT)); \
@@ -56,10 +56,10 @@
        color_box->set_label(label);
        color_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        color_box->set_position(1, -2);
-       color_box->connect_move_focus_up(sigc::mem_fun(this, 
&attributes_dialog_t::focus_previous));
-       color_box->connect_move_focus_down(sigc::mem_fun(this, 
&attributes_dialog_t::focus_next));
-       color_box->connect_activate(sigc::mem_fun(this, 
&attributes_dialog_t::handle_activate));
-       color_box->connect_toggled(sigc::mem_fun(this, 
&attributes_dialog_t::update_attribute_lines));
+       color_box->connect_move_focus_up(signals::mem_fun(this, 
&attributes_dialog_t::focus_previous));
+       color_box->connect_move_focus_down(signals::mem_fun(this, 
&attributes_dialog_t::focus_next));
+       color_box->connect_activate(signals::mem_fun(this, 
&attributes_dialog_t::handle_activate));
+       color_box->connect_toggled(signals::mem_fun(this, 
&attributes_dialog_t::update_attribute_lines));
 
 
        expander_group = new expander_group_t();
@@ -107,23 +107,23 @@
        syntax_highlight->set_anchor(text_area, T3_PARENT(T3_ANCHOR_BOTTOMLEFT) 
| T3_CHILD(T3_ANCHOR_TOPLEFT));
        syntax_highlight->set_position(0, 0);
 
-       expander_group->connect_expanded(sigc::mem_fun(this, 
&attributes_dialog_t::expander_size_change));
+       expander_group->connect_expanded(signals::mem_fun(this, 
&attributes_dialog_t::expander_size_change));
 
 
        cancel_button = new button_t("_Cancel");
        cancel_button->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMRIGHT) | 
T3_CHILD(T3_ANCHOR_BOTTOMRIGHT));
        cancel_button->set_position(-1, -2);
-       cancel_button->connect_activate(sigc::mem_fun(this, 
&attributes_dialog_t::close));
-       cancel_button->connect_move_focus_up(sigc::mem_fun(this, 
&attributes_dialog_t::focus_previous));
-       cancel_button->connect_move_focus_up(sigc::mem_fun(this, 
&attributes_dialog_t::focus_previous));
-       cancel_button->connect_move_focus_left(sigc::mem_fun(this, 
&attributes_dialog_t::focus_previous));
+       cancel_button->connect_activate(signals::mem_fun(this, 
&attributes_dialog_t::close));
+       cancel_button->connect_move_focus_up(signals::mem_fun(this, 
&attributes_dialog_t::focus_previous));
+       cancel_button->connect_move_focus_up(signals::mem_fun(this, 
&attributes_dialog_t::focus_previous));
+       cancel_button->connect_move_focus_left(signals::mem_fun(this, 
&attributes_dialog_t::focus_previous));
 
        ok_button = new button_t("_Ok", true);
        ok_button->set_anchor(cancel_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        ok_button->set_position(0, -2);
-       ok_button->connect_move_focus_up(sigc::mem_fun(this, 
&attributes_dialog_t::focus_previous));
-       ok_button->connect_move_focus_right(sigc::mem_fun(this, 
&attributes_dialog_t::focus_next));
-       ok_button->connect_activate(sigc::mem_fun(this, 
&attributes_dialog_t::handle_activate));
+       ok_button->connect_move_focus_up(signals::mem_fun(this, 
&attributes_dialog_t::focus_previous));
+       ok_button->connect_move_focus_right(signals::mem_fun(this, 
&attributes_dialog_t::focus_next));
+       ok_button->connect_activate(signals::mem_fun(this, 
&attributes_dialog_t::handle_activate));
 
        push_back(color_box);
        push_back(interface);
@@ -134,8 +134,8 @@
 
        picker = new attribute_picker_dialog_t();
        picker->center_over(this);
-       picker->connect_attribute_selected(sigc::mem_fun(this, 
&attributes_dialog_t::attribute_selected));
-       picker->connect_default_selected(sigc::mem_fun(this, 
&attributes_dialog_t::default_attribute_selected));
+       picker->connect_attribute_selected(signals::mem_fun(this, 
&attributes_dialog_t::attribute_selected));
+       picker->connect_default_selected(signals::mem_fun(this, 
&attributes_dialog_t::default_attribute_selected));
 }
 
 bool attributes_dialog_t::set_size(optint height, optint width) {
@@ -205,6 +205,13 @@
                SET_WITH_DEFAULT(addition, ADDITION);
                SET_WITH_DEFAULT(deletion, DELETION);
 #undef SET_WITH_DEFAULT
+               default:
+                       // This means we somehow got a bad attribute key, which 
is a logic error.
+                       // However, we don't want to crash on this (at least 
outside of debug mode).
+#ifdef DEBUG
+                       PANIC();
+#endif
+                       break;
        }
        picker->show();
 }
@@ -402,6 +409,13 @@
                SET_WITH_DEFAULT(addition, ADDITION);
                SET_WITH_DEFAULT(deletion, DELETION);
 #undef SET_WITH_DEFAULT
+       default:
+               // This means we somehow got a bad attribute key, which is a 
logic error.
+               // However, we don't want to crash on this (at least outside of 
debug mode).
+#ifdef DEBUG
+               PANIC();
+#endif
+               break;
        }
        picker->hide();
 }
@@ -454,6 +468,13 @@
                SET_DEFAULT(addition, ADDITION);
                SET_DEFAULT(deletion, DELETION);
 #undef SET_DEFAULT
+       default:
+               // This means we somehow got a bad attribute key, which is a 
logic error.
+               // However, we don't want to crash on this (at least outside of 
debug mode).
+#ifdef DEBUG
+               PANIC();
+#endif
+               break;
        }
        picker->hide();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/dialogs/encodingdialog.cc 
new/tilde-0.3.7/src/dialogs/encodingdialog.cc
--- old/tilde-0.3.4/src/dialogs/encodingdialog.cc       2015-02-12 
08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/dialogs/encodingdialog.cc       2016-02-23 
08:20:17.000000000 +0100
@@ -115,8 +115,8 @@
        list = new list_pane_t(true);
        list->set_size(height - 4, width - 2);
        list->set_position(1, 1);
-       list->connect_activate(sigc::mem_fun(this, 
&encoding_dialog_t::ok_activated));
-       list->connect_selection_changed(sigc::mem_fun(this, 
&encoding_dialog_t::selection_changed));
+       list->connect_activate(signals::mem_fun(this, 
&encoding_dialog_t::ok_activated));
+       list->connect_selection_changed(signals::mem_fun(this, 
&encoding_dialog_t::selection_changed));
 
        for (charset_descs_t::const_iterator iter = available_charsets.begin(); 
iter != available_charsets.end(); iter++) {
                label_t *label = new label_t(iter->name);
@@ -133,17 +133,17 @@
        manual_entry->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMLEFT) | 
T3_CHILD(T3_ANCHOR_BOTTOMLEFT));
        manual_entry->set_position(-1, 2);
        manual_entry->set_size(1, 25);
-       manual_entry->connect_activate(sigc::mem_fun(this, 
&encoding_dialog_t::ok_activated));
+       manual_entry->connect_activate(signals::mem_fun(this, 
&encoding_dialog_t::ok_activated));
        manual_entry->hide();
 
        cancel_button = new button_t("_Cancel", false);
        cancel_button->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMRIGHT) | 
T3_CHILD(T3_ANCHOR_BOTTOMRIGHT));
        cancel_button->set_position(-1, -2);
-       cancel_button->connect_activate(sigc::mem_fun(this, 
&encoding_dialog_t::close));
+       cancel_button->connect_activate(signals::mem_fun(this, 
&encoding_dialog_t::close));
        ok_button = new button_t("_OK", true);
        ok_button->set_anchor(cancel_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        ok_button->set_position(0, -2);
-       ok_button->connect_activate(sigc::mem_fun(this, 
&encoding_dialog_t::ok_activated));
+       ok_button->connect_activate(signals::mem_fun(this, 
&encoding_dialog_t::ok_activated));
 
        push_back(list);
        push_back(horizontal_separator);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/dialogs/highlightdialog.cc 
new/tilde-0.3.7/src/dialogs/highlightdialog.cc
--- old/tilde-0.3.4/src/dialogs/highlightdialog.cc      2015-02-12 
08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/dialogs/highlightdialog.cc      2016-02-23 
08:20:17.000000000 +0100
@@ -38,7 +38,7 @@
        list = new list_pane_t(true);
        list->set_size(height - 3, width - 2);
        list->set_position(1, 1);
-       list->connect_activate(sigc::mem_fun(this, 
&highlight_dialog_t::ok_activated));
+       list->connect_activate(signals::mem_fun(this, 
&highlight_dialog_t::ok_activated));
 
        label = new label_t("Plain Text");
        list->push_back(label);
@@ -63,11 +63,11 @@
        cancel_button = new button_t("_Cancel", false);
        cancel_button->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMRIGHT) | 
T3_CHILD(T3_ANCHOR_BOTTOMRIGHT));
        cancel_button->set_position(-1, -2);
-       cancel_button->connect_activate(sigc::mem_fun(this, 
&highlight_dialog_t::close));
+       cancel_button->connect_activate(signals::mem_fun(this, 
&highlight_dialog_t::close));
        ok_button = new button_t("_OK", true);
        ok_button->set_anchor(cancel_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        ok_button->set_position(0, -2);
-       ok_button->connect_activate(sigc::mem_fun(this, 
&highlight_dialog_t::ok_activated));
+       ok_button->connect_activate(signals::mem_fun(this, 
&highlight_dialog_t::ok_activated));
 
        push_back(list);
        push_back(ok_button);
@@ -96,7 +96,7 @@
 
        if (idx == 0) {
                hide();
-               language_selected(NULL);
+               language_selected(NULL, NULL);
                return;
        }
 
@@ -110,7 +110,7 @@
                return;
        }
        hide();
-       language_selected(highlight);
+       language_selected(highlight, names[idx - 1].name);
 }
 
 void highlight_dialog_t::set_selected(const char *lang_file) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/dialogs/highlightdialog.h 
new/tilde-0.3.7/src/dialogs/highlightdialog.h
--- old/tilde-0.3.4/src/dialogs/highlightdialog.h       2015-02-12 
08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/dialogs/highlightdialog.h       2016-02-23 
08:20:17.000000000 +0100
@@ -32,7 +32,7 @@
                void ok_activated(void);
                void set_selected(const char *lang_file);
 
-       T3_WIDGET_SIGNAL(language_selected, void, t3_highlight_t *);
+       T3_WIDGET_SIGNAL(language_selected, void, t3_highlight_t *, const char 
*);
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/dialogs/openrecentdialog.cc 
new/tilde-0.3.7/src/dialogs/openrecentdialog.cc
--- old/tilde-0.3.4/src/dialogs/openrecentdialog.cc     2015-02-12 
08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/dialogs/openrecentdialog.cc     2016-02-23 
08:20:17.000000000 +0100
@@ -23,16 +23,16 @@
        list = new list_pane_t(true);
        list->set_size(height - 3, width - 2);
        list->set_position(1, 1);
-       list->connect_activate(sigc::mem_fun(this, 
&open_recent_dialog_t::ok_activated));
+       list->connect_activate(signals::mem_fun(this, 
&open_recent_dialog_t::ok_activated));
 
        cancel_button = new button_t("_Cancel", false);
        cancel_button->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMRIGHT) | 
T3_CHILD(T3_ANCHOR_BOTTOMRIGHT));
        cancel_button->set_position(-1, -2);
-       cancel_button->connect_activate(sigc::mem_fun(this, 
&open_recent_dialog_t::close));
+       cancel_button->connect_activate(signals::mem_fun(this, 
&open_recent_dialog_t::close));
        ok_button = new button_t("_OK", true);
        ok_button->set_anchor(cancel_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        ok_button->set_position(0, -2);
-       ok_button->connect_activate(sigc::mem_fun(this, 
&open_recent_dialog_t::ok_activated));
+       ok_button->connect_activate(signals::mem_fun(this, 
&open_recent_dialog_t::ok_activated));
 
        push_back(list);
        push_back(ok_button);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/dialogs/optionsdialog.cc 
new/tilde-0.3.7/src/dialogs/optionsdialog.cc
--- old/tilde-0.3.4/src/dialogs/optionsdialog.cc        2015-02-12 
08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/dialogs/optionsdialog.cc        2016-02-23 
08:20:17.000000000 +0100
@@ -35,8 +35,8 @@
        tabsize_field->set_size(1, 5);
        tabsize_field->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        tabsize_field->set_position(1, -2);
-       tabsize_field->connect_move_focus_down(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       tabsize_field->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       tabsize_field->connect_move_focus_down(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       tabsize_field->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
        push_back(tabsize_field);
 
        width = label->get_width() + 2 + 5;
@@ -48,9 +48,9 @@
        tab_spaces_box->set_label(label);
        tab_spaces_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        tab_spaces_box->set_position(2, -2);
-       tab_spaces_box->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       tab_spaces_box->connect_move_focus_down(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       tab_spaces_box->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       tab_spaces_box->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       tab_spaces_box->connect_move_focus_down(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       tab_spaces_box->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
        push_back(tab_spaces_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -62,9 +62,9 @@
        wrap_box->set_label(label);
        wrap_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        wrap_box->set_position(3, -2);
-       wrap_box->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       wrap_box->connect_move_focus_down(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       wrap_box->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       wrap_box->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       wrap_box->connect_move_focus_down(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       wrap_box->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
        push_back(wrap_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -76,9 +76,9 @@
        auto_indent_box->set_label(label);
        auto_indent_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        auto_indent_box->set_position(4, -2);
-       auto_indent_box->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       auto_indent_box->connect_move_focus_down(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       auto_indent_box->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       auto_indent_box->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       auto_indent_box->connect_move_focus_down(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       auto_indent_box->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
        push_back(auto_indent_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -90,9 +90,9 @@
        indent_aware_home_box->set_label(label);
        indent_aware_home_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        indent_aware_home_box->set_position(5, -2);
-       indent_aware_home_box->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       indent_aware_home_box->connect_move_focus_down(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       indent_aware_home_box->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       indent_aware_home_box->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       indent_aware_home_box->connect_move_focus_down(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       indent_aware_home_box->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
        push_back(indent_aware_home_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -104,9 +104,9 @@
        show_tabs_box->set_label(label);
        show_tabs_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        show_tabs_box->set_position(6, -2);
-       show_tabs_box->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       show_tabs_box->connect_move_focus_down(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       show_tabs_box->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       show_tabs_box->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       show_tabs_box->connect_move_focus_down(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       show_tabs_box->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
        push_back(show_tabs_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -118,9 +118,9 @@
        strip_spaces_box->set_label(label);
        strip_spaces_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        strip_spaces_box->set_position(7, -2);
-       strip_spaces_box->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       strip_spaces_box->connect_move_focus_down(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       strip_spaces_box->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       strip_spaces_box->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       strip_spaces_box->connect_move_focus_down(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       strip_spaces_box->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
        push_back(strip_spaces_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -128,17 +128,17 @@
        cancel_button = new button_t("_Cancel");
        cancel_button->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMRIGHT) | 
T3_CHILD(T3_ANCHOR_BOTTOMRIGHT));
        cancel_button->set_position(-1, -2);
-       cancel_button->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::close));
-       cancel_button->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       cancel_button->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       cancel_button->connect_move_focus_left(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       cancel_button->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::close));
+       cancel_button->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       cancel_button->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       cancel_button->connect_move_focus_left(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
 
        ok_button = new button_t("_Ok", true);
        ok_button->set_anchor(cancel_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        ok_button->set_position(0, -2);
-       ok_button->connect_move_focus_up(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
-       ok_button->connect_move_focus_right(sigc::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
-       ok_button->connect_activate(sigc::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
+       ok_button->connect_move_focus_up(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_previous));
+       ok_button->connect_move_focus_right(signals::mem_fun(this, 
&buffer_options_dialog_t::focus_next));
+       ok_button->connect_activate(signals::mem_fun(this, 
&buffer_options_dialog_t::handle_activate));
 
        push_back(ok_button);
        push_back(cancel_button);
@@ -224,9 +224,9 @@
        hide_menu_box->set_label(label);
        hide_menu_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        hide_menu_box->set_position(1, -2);
-       hide_menu_box->connect_move_focus_up(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
-       hide_menu_box->connect_move_focus_down(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_next));
-       hide_menu_box->connect_activate(sigc::mem_fun(this, 
&misc_options_dialog_t::handle_activate));
+       hide_menu_box->connect_move_focus_up(signals::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
+       hide_menu_box->connect_move_focus_down(signals::mem_fun(this, 
&misc_options_dialog_t::focus_next));
+       hide_menu_box->connect_activate(signals::mem_fun(this, 
&misc_options_dialog_t::handle_activate));
        push_back(hide_menu_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -238,9 +238,9 @@
        save_backup_box->set_label(label);
        save_backup_box->set_anchor(this, T3_PARENT(T3_ANCHOR_TOPRIGHT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        save_backup_box->set_position(2, -2);
-       save_backup_box->connect_move_focus_up(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
-       save_backup_box->connect_move_focus_down(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_next));
-       save_backup_box->connect_activate(sigc::mem_fun(this, 
&misc_options_dialog_t::handle_activate));
+       save_backup_box->connect_move_focus_up(signals::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
+       save_backup_box->connect_move_focus_down(signals::mem_fun(this, 
&misc_options_dialog_t::focus_next));
+       save_backup_box->connect_activate(signals::mem_fun(this, 
&misc_options_dialog_t::handle_activate));
        push_back(save_backup_box);
 
        width = max(label->get_width() + 2 + 3, width);
@@ -248,17 +248,17 @@
        cancel_button = new button_t("_Cancel");
        cancel_button->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMRIGHT) | 
T3_CHILD(T3_ANCHOR_BOTTOMRIGHT));
        cancel_button->set_position(-1, -2);
-       cancel_button->connect_activate(sigc::mem_fun(this, 
&misc_options_dialog_t::close));
-       cancel_button->connect_move_focus_up(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
-       cancel_button->connect_move_focus_up(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
-       cancel_button->connect_move_focus_left(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
+       cancel_button->connect_activate(signals::mem_fun(this, 
&misc_options_dialog_t::close));
+       cancel_button->connect_move_focus_up(signals::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
+       cancel_button->connect_move_focus_up(signals::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
+       cancel_button->connect_move_focus_left(signals::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
 
        ok_button = new button_t("_Ok", true);
        ok_button->set_anchor(cancel_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        ok_button->set_position(0, -2);
-       ok_button->connect_move_focus_up(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
-       ok_button->connect_move_focus_right(sigc::mem_fun(this, 
&misc_options_dialog_t::focus_next));
-       ok_button->connect_activate(sigc::mem_fun(this, 
&misc_options_dialog_t::handle_activate));
+       ok_button->connect_move_focus_up(signals::mem_fun(this, 
&misc_options_dialog_t::focus_previous));
+       ok_button->connect_move_focus_right(signals::mem_fun(this, 
&misc_options_dialog_t::focus_next));
+       ok_button->connect_activate(signals::mem_fun(this, 
&misc_options_dialog_t::handle_activate));
 
        push_back(ok_button);
        push_back(cancel_button);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/dialogs/selectbufferdialog.cc 
new/tilde-0.3.7/src/dialogs/selectbufferdialog.cc
--- old/tilde-0.3.4/src/dialogs/selectbufferdialog.cc   2015-02-12 
08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/dialogs/selectbufferdialog.cc   2016-02-23 
08:20:17.000000000 +0100
@@ -22,21 +22,21 @@
        list = new list_pane_t(true);
        list->set_size(height - 3, width - 2);
        list->set_position(1, 1);
-       list->connect_activate(sigc::mem_fun(this, 
&select_buffer_dialog_t::ok_activated));
+       list->connect_activate(signals::mem_fun(this, 
&select_buffer_dialog_t::ok_activated));
 
        cancel_button = new button_t("_Cancel", false);
        cancel_button->set_anchor(this, T3_PARENT(T3_ANCHOR_BOTTOMRIGHT) | 
T3_CHILD(T3_ANCHOR_BOTTOMRIGHT));
        cancel_button->set_position(-1, -2);
-       cancel_button->connect_activate(sigc::mem_fun(this, 
&select_buffer_dialog_t::close));
-       cancel_button->connect_move_focus_left(sigc::mem_fun(this, 
&select_buffer_dialog_t::focus_previous));
+       cancel_button->connect_activate(signals::mem_fun(this, 
&select_buffer_dialog_t::close));
+       cancel_button->connect_move_focus_left(signals::mem_fun(this, 
&select_buffer_dialog_t::focus_previous));
        cancel_button->connect_move_focus_up(
-               sigc::bind(sigc::mem_fun(this, 
&select_buffer_dialog_t::set_child_focus), list));
+               signals::bind(signals::mem_fun(this, 
&select_buffer_dialog_t::set_child_focus), list));
        ok_button = new button_t("_OK", true);
        ok_button->set_anchor(cancel_button, T3_PARENT(T3_ANCHOR_TOPLEFT) | 
T3_CHILD(T3_ANCHOR_TOPRIGHT));
        ok_button->set_position(0, -2);
-       ok_button->connect_activate(sigc::mem_fun(this, 
&select_buffer_dialog_t::ok_activated));
-       cancel_button->connect_move_focus_right(sigc::mem_fun(this, 
&select_buffer_dialog_t::focus_next));
-       cancel_button->connect_move_focus_up(sigc::mem_fun(this, 
&select_buffer_dialog_t::focus_previous));
+       ok_button->connect_activate(signals::mem_fun(this, 
&select_buffer_dialog_t::ok_activated));
+       cancel_button->connect_move_focus_right(signals::mem_fun(this, 
&select_buffer_dialog_t::focus_next));
+       cancel_button->connect_move_focus_up(signals::mem_fun(this, 
&select_buffer_dialog_t::focus_previous));
 
        push_back(list);
        push_back(ok_button);
@@ -79,7 +79,7 @@
                        multi_widget = new multi_widget_t();
                        multi_widget->set_size(None, width - 5);
                        multi_widget->show();
-                       bullet = new bullet_t(sigc::mem_fun((*iter), 
&file_buffer_t::get_has_window));
+                       bullet = new bullet_t(signals::mem_fun((*iter), 
&file_buffer_t::get_has_window));
                        multi_widget->push_back(bullet, -1, true, false);
                        name = (*iter)->get_name();
                        if (name == NULL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/filebuffer.cc new/tilde-0.3.7/src/filebuffer.cc
--- old/tilde-0.3.4/src/filebuffer.cc   2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/filebuffer.cc   2016-02-23 08:20:17.000000000 +0100
@@ -50,7 +50,7 @@
                name_line.set_text(&converted_name);
        }
 
-       connect_rewrap_required(sigc::mem_fun(this, 
&file_buffer_t::invalidate_highlight));
+       connect_rewrap_required(signals::mem_fun(this, 
&file_buffer_t::invalidate_highlight));
 
        view_parameters->set_tabsize(option.tabsize);
        view_parameters->set_wrap(option.wrap ? wrap_type_t::WORD : 
wrap_type_t::NONE);
@@ -71,6 +71,8 @@
 rw_result_t file_buffer_t::load(load_process_t *state) {
        const string *line;
        t3_highlight_t *highlight = NULL;
+       t3_highlight_lang_t lang;
+       t3_bool success = t3_false;
        int i;
 
        if (state->file != this)
@@ -139,6 +141,8 @@
                                                                }
                                                                state->state = 
load_process_t::READING;
                                                                continue;
+                                                       default:
+                                                               break;
                                                }
                                                state->state = 
load_process_t::READING;
                                        }
@@ -171,27 +175,29 @@
           specified the language by hand, that is more likely to be correct 
than
           any autodetection based on the first line or the file name.
        */
-       for (i = 0; i < size() && i < 5 && highlight == NULL; i++) {
+       for (i = 0; i < size() && i < 5 && !success; i++) {
                line = get_line_data(i)->get_data();
-               highlight = t3_highlight_load_by_detect(line->data(), 
line->size(), false,
-                       map_highlight, NULL, T3_HIGHLIGHT_UTF8, NULL);
+               success = t3_highlight_detect(line->data(), line->size(), 
false, T3_HIGHLIGHT_UTF8, &lang, NULL);
        }
-       for (i = size() - 1; i >= 5 && highlight == NULL; i--) {
+       for (i = size() - 1; i >= 5 && !success; i--) {
                line = get_line_data(i)->get_data();
-               highlight = t3_highlight_load_by_detect(line->data(), 
line->size(), false,
-                       map_highlight, NULL, T3_HIGHLIGHT_UTF8, NULL);
+               success = t3_highlight_detect(line->data(), line->size(), 
false, T3_HIGHLIGHT_UTF8, &lang, NULL);
        }
-       if (highlight == NULL) {
+       if (!success) {
                line = get_line_data(0)->get_data();
-               highlight = t3_highlight_load_by_detect(line->data(), 
line->size(), true,
-                       map_highlight, NULL, T3_HIGHLIGHT_UTF8, NULL);
+               success = t3_highlight_detect(line->data(), line->size(), true, 
T3_HIGHLIGHT_UTF8, &lang, NULL);
        }
-       if (highlight == NULL) {
-               highlight = t3_highlight_load_by_filename(name, map_highlight, 
NULL, T3_HIGHLIGHT_UTF8, NULL);
-               last_match = t3_highlight_new_match(highlight);
+       if (!success) {
+               success = t3_highlight_lang_by_filename(name, 
T3_HIGHLIGHT_UTF8, &lang, NULL);
        }
-       if (highlight != NULL)
+       if (success) {
+               highlight = t3_highlight_load(lang.lang_file, map_highlight, 
NULL, T3_HIGHLIGHT_UTF8 | T3_HIGHLIGHT_USE_PATH, NULL);
                set_highlight(highlight);
+               std::map<std::string, std::string>::iterator iter = 
option.line_comment_map.find(lang.name);
+               if (iter != option.line_comment_map.end())
+                       set_line_comment(iter->second.c_str());
+               t3_highlight_free_lang(lang);
+       }
        return rw_result_t(rw_result_t::SUCCESS);
 }
 
@@ -657,3 +663,93 @@
 
        return old_valid != matching_brace_valid || (old_valid && 
old_coordinate != matching_brace_coordinate);
 }
+
+
+void file_buffer_t::set_line_comment(const char *text) {
+       if (text == NULL)
+               line_comment.clear();
+       else
+               line_comment = text;
+}
+
+int starts_with_comment(const std::string *text, const std::string 
*line_comment) {
+       size_t i;
+       for (i = 0; i < text->size(); i++) {
+               if (text->at(i) != ' ' && text->at(i) != '\t')
+                       break;
+       }
+       if (text->compare(i, line_comment->size(), *line_comment) == 0)
+               return i;
+       return -1;
+}
+
+void file_buffer_t::toggle_line_comment() {
+       if (line_comment.empty())
+               return;
+
+       if (get_selection_mode() == selection_mode_t::NONE) {
+               const std::string *text = 
get_line_data(cursor.line)->get_data();
+               int comment_start = starts_with_comment(text, &line_comment);
+               if (comment_start >= 0) {
+                       text_coordinate_t saved_cursor = cursor;
+                       delete_block(text_coordinate_t(cursor.line, 
comment_start), text_coordinate_t(cursor.line, comment_start + 
line_comment.size()));
+                       if (comment_start < saved_cursor.pos)
+                               saved_cursor.pos -= 
std::min<int>(line_comment.size(), saved_cursor.pos - comment_start);
+                       cursor.pos = saved_cursor.pos;
+               } else {
+                       text_coordinate_t saved_cursor = cursor;
+                       //FIXME: this causes the cursor position to be recorded 
incorrectly in the undo information.
+                       // although one could argue this is to some extent 
better as it shows the actual edit.
+                       cursor.pos = 0;
+                       insert_block(&line_comment);
+                       cursor.pos = saved_cursor.pos + line_comment.size();
+               }
+       } else {
+               text_coordinate_t selection_start = get_selection_start();
+               text_coordinate_t selection_end = get_selection_end();
+               int first_line = std::min(selection_start.line, 
selection_end.line);
+               int last_line = std::max(selection_start.line, 
selection_end.line);
+               int i;
+               for (i = first_line; i <= last_line; i++) {
+                       const std::string *text = get_line_data(i)->get_data();
+                       int comment_start = starts_with_comment(text, 
&line_comment);
+                       if (comment_start < 0)
+                               break;
+               }
+               selection_mode_t old_mode = get_selection_mode();
+               //FIXME: The code below contains some hideous hacks to make 
sure the cursor positioning
+               // for undos is as expected. Ideally we'd just call 
start_undo_block here.
+               if (i > last_line) {
+                       for (i = first_line; i <= last_line; i++) {
+                               const std::string *text = 
get_line_data(i)->get_data();
+                               int comment_start = starts_with_comment(text, 
&line_comment);
+                               if (i == selection_start.line && comment_start 
< selection_start.pos)
+                                       selection_start.pos -= 
std::min<int>(line_comment.size(), selection_start.pos - comment_start);
+                               if (i == selection_end.line && comment_start < 
selection_end.pos)
+                                       selection_end.pos -= 
std::min<int>(line_comment.size(), selection_end.pos - comment_start);
+                               if (i == first_line) {
+                                       cursor.line = i;
+                                       cursor.pos = comment_start + 
line_comment.size();
+                                       start_undo_block();
+                               }
+                               delete_block(text_coordinate_t(i, 
comment_start), text_coordinate_t(i, comment_start + line_comment.size()));
+                       }
+               } else {
+                       for (i = first_line; i <= last_line; i++) {
+                               cursor.line = i;
+                               cursor.pos = 0;
+                               if (i == first_line)
+                                       start_undo_block();
+                               insert_block(&line_comment);
+                       }
+                       selection_start.pos += line_comment.size();
+                       selection_end.pos += line_comment.size();
+               }
+               end_undo_block();
+               set_selection_mode(selection_mode_t::NONE);
+               cursor = selection_start;
+               set_selection_mode(old_mode);
+               cursor = selection_end;
+               set_selection_end();
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/filebuffer.h new/tilde-0.3.7/src/filebuffer.h
--- old/tilde-0.3.4/src/filebuffer.h    2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/filebuffer.h    2016-02-23 08:20:17.000000000 +0100
@@ -38,6 +38,7 @@
                t3_highlight_match_t *last_match;
                bool matching_brace_valid;
                text_coordinate_t matching_brace_coordinate;
+               std::string line_comment;
 
        private:
                virtual void prepare_paint_line(int line);
@@ -72,6 +73,9 @@
                    @return A boolean indicating whether the matching brace 
information changed.
                */
                bool update_matching_brace(void);
+
+               void set_line_comment(const char *text);
+               void toggle_line_comment();
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/fileeditwindow.cc new/tilde-0.3.7/src/fileeditwindow.cc
--- old/tilde-0.3.4/src/fileeditwindow.cc       2015-02-12 08:14:40.000000000 
+0100
+++ new/tilde-0.3.7/src/fileeditwindow.cc       2016-02-23 08:20:17.000000000 
+0100
@@ -20,7 +20,7 @@
                _text = new file_buffer_t();
 
        _text->set_has_window(true);
-       rewrap_connection = _text->connect_rewrap_required(sigc::mem_fun(this, 
&file_edit_window_t::force_repaint_to_bottom));
+       rewrap_connection = 
_text->connect_rewrap_required(signals::mem_fun(this, 
&file_edit_window_t::force_repaint_to_bottom));
        edit_window_t::set_text(_text, _text->get_view_parameters());
        edit_window_t::set_autocompleter(new file_autocompleter_t());
 
@@ -71,7 +71,7 @@
        save_view_parameters(old_text->view_parameters);
        rewrap_connection.disconnect();
        _text->set_has_window(true);
-       rewrap_connection = _text->connect_rewrap_required(sigc::mem_fun(this, 
&file_edit_window_t::force_repaint_to_bottom));
+       rewrap_connection = 
_text->connect_rewrap_required(signals::mem_fun(this, 
&file_edit_window_t::force_repaint_to_bottom));
        edit_window_t::set_text(_text, _text->get_view_parameters());
 }
 
@@ -82,12 +82,21 @@
 bool file_edit_window_t::process_key(t3_widget::key_t key) {
        bool result = edit_window_t::process_key(key);
 
-       if (!result && key == (EKEY_CTRL | ']')) {
-               if (get_text()->goto_matching_brace()) {
-                       ensure_cursor_on_screen();
-                       redraw = true;
+       if (!result) {
+               switch (key) {
+                       case EKEY_CTRL | ']':
+                               if (get_text()->goto_matching_brace()) {
+                                       ensure_cursor_on_screen();
+                                       redraw = true;
+                               }
+                               return true;
+                       case EKEY_CTRL | '_':
+                               get_text()->toggle_line_comment();
+                               redraw = true;
+                               return true;
+                       default:
+                               break;
                }
-               return true;
        }
        return result;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/fileeditwindow.h new/tilde-0.3.7/src/fileeditwindow.h
--- old/tilde-0.3.4/src/fileeditwindow.h        2015-02-12 08:14:40.000000000 
+0100
+++ new/tilde-0.3.7/src/fileeditwindow.h        2016-02-23 08:20:17.000000000 
+0100
@@ -21,8 +21,9 @@
 
 class file_edit_window_t : public edit_window_t {
        private:
-               sigc::connection rewrap_connection;
+               signals::connection rewrap_connection;
                void force_repaint_to_bottom(rewrap_type_t type, int line, int 
pos);
+
        public:
                file_edit_window_t(file_buffer_t *_text = NULL);
                virtual ~file_edit_window_t(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/filestate.cc new/tilde-0.3.7/src/filestate.cc
--- old/tilde-0.3.4/src/filestate.cc    2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/filestate.cc    2016-02-23 08:20:17.000000000 +0100
@@ -38,11 +38,11 @@
        rw_result_t rw_result;
 
        if (state == SELECT_FILE) {
-               
connections.push_back(open_file_dialog->connect_closed(sigc::mem_fun(this, 
&load_process_t::abort)));
-               
connections.push_back(open_file_dialog->connect_file_selected(sigc::mem_fun(this,
 &load_process_t::file_selected)));
+               
connections.push_back(open_file_dialog->connect_file_selected(signals::mem_fun(this,
 &load_process_t::file_selected)));
+               
connections.push_back(open_file_dialog->connect_closed(signals::mem_fun(this, 
&load_process_t::abort)));
                open_file_dialog->reset();
                open_file_dialog->show();
-               
connections.push_back(encoding_dialog->connect_activate(sigc::mem_fun(this, 
&load_process_t::encoding_selected)));
+               
connections.push_back(encoding_dialog->connect_activate(signals::mem_fun(this, 
&load_process_t::encoding_selected)));
                encoding_dialog->set_encoding(encoding.c_str());
                return false;
        }
@@ -75,15 +75,17 @@
                        break;
                case rw_result_t::CONVERSION_IMPRECISE:
                        printf_into(&message, "Conversion from encoding %s is 
irreversible", file->get_encoding());
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &load_process_t::run), 0));
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &load_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &load_process_t::run), 0));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &load_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_closed(signals::mem_fun(this,
 &load_process_t::abort)));
                        continue_abort_dialog->set_message(&message);
                        continue_abort_dialog->show();
                        return false;
                case rw_result_t::CONVERSION_ILLEGAL:
                        printf_into(&message, "Conversion from encoding %s 
encountered illegal characters", file->get_encoding());
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &load_process_t::run), 0));
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &load_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &load_process_t::run), 0));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &load_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_closed(signals::mem_fun(this,
 &load_process_t::abort)));
                        continue_abort_dialog->set_message(&message);
                        continue_abort_dialog->show();
                        return false;
@@ -94,8 +96,9 @@
                        error_dialog->show();
                        break;
                case rw_result_t::BOM_FOUND:
-                       
connections.push_back(preserve_bom_dialog->connect_activate(sigc::mem_fun(this, 
&load_process_t::preserve_bom), 0));
-                       
connections.push_back(preserve_bom_dialog->connect_activate(sigc::mem_fun(this, 
&load_process_t::remove_bom), 1));
+                       
connections.push_back(preserve_bom_dialog->connect_activate(signals::mem_fun(this,
 &load_process_t::preserve_bom), 0));
+                       
connections.push_back(preserve_bom_dialog->connect_activate(signals::mem_fun(this,
 &load_process_t::remove_bom), 1));
+                       
connections.push_back(preserve_bom_dialog->connect_closed(signals::mem_fun(this,
 &load_process_t::preserve_bom)));
                        preserve_bom_dialog->show();
                        return false;
                default:
@@ -155,8 +158,9 @@
        (new load_process_t(cb, name, encoding, missing_ok))->run();
 }
 
-save_as_process_t::save_as_process_t(const callback_t &cb, file_buffer_t 
*_file) : stepped_process_t(cb), state(SELECT_FILE),
-               file(_file), save_name(NULL), real_name(NULL), temp_name(NULL), 
fd(-1), wrapper(NULL)
+save_as_process_t::save_as_process_t(const callback_t &cb, file_buffer_t 
*_file, bool _allow_highlight_change)
+               : stepped_process_t(cb), state(SELECT_FILE), file(_file), 
allow_highlight_change(_allow_highlight_change),
+                 highlight_changed(false), save_name(NULL), real_name(NULL), 
temp_name(NULL), fd(-1), wrapper(NULL)
 {}
 
 bool save_as_process_t::step(void) {
@@ -166,12 +170,12 @@
        if (state == SELECT_FILE) {
                const char *current_name = file->get_name();
 
-               
connections.push_back(save_as_dialog->connect_closed(sigc::mem_fun(this, 
&save_as_process_t::abort)));
-               
connections.push_back(save_as_dialog->connect_file_selected(sigc::mem_fun(this, 
&save_as_process_t::file_selected)));
+               
connections.push_back(save_as_dialog->connect_file_selected(signals::mem_fun(this,
 &save_as_process_t::file_selected)));
+               
connections.push_back(save_as_dialog->connect_closed(signals::mem_fun(this, 
&save_as_process_t::abort)));
 
                save_as_dialog->set_file(current_name);
                save_as_dialog->show();
-               
connections.push_back(encoding_dialog->connect_activate(sigc::mem_fun(this, 
&save_as_process_t::encoding_selected)));
+               
connections.push_back(encoding_dialog->connect_activate(signals::mem_fun(this, 
&save_as_process_t::encoding_selected)));
                encoding_dialog->set_encoding(file->get_encoding());
                return false;
        }
@@ -183,15 +187,17 @@
                        break;
                case rw_result_t::FILE_EXISTS:
                        printf_into(&message, "File '%s' already exists", 
name.c_str());
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &save_as_process_t::run), 0));
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &save_as_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &save_as_process_t::run), 0));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &save_as_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_closed(signals::mem_fun(this,
 &save_as_process_t::abort)));
                        continue_abort_dialog->set_message(&message);
                        continue_abort_dialog->show();
                        return false;
                case rw_result_t::FILE_EXISTS_READONLY:
                        printf_into(&message, "File '%s' is readonly", 
save_name);
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &save_as_process_t::run), 0));
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &save_as_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &save_as_process_t::run), 0));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &save_as_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_closed(signals::mem_fun(this,
 &save_as_process_t::abort)));
                        continue_abort_dialog->set_message(&message);
                        continue_abort_dialog->show();
                        return false;
@@ -212,8 +218,9 @@
                                encoding = file->get_encoding();
                        i++;
                        printf_into(&message, "Conversion into encoding %s is 
irreversible", encoding.c_str());
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &save_as_process_t::run), 0));
-                       
connections.push_back(continue_abort_dialog->connect_activate(sigc::mem_fun(this,
 &save_as_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &save_as_process_t::run), 0));
+                       
connections.push_back(continue_abort_dialog->connect_activate(signals::mem_fun(this,
 &save_as_process_t::abort), 1));
+                       
connections.push_back(continue_abort_dialog->connect_closed(signals::mem_fun(this,
 &save_as_process_t::abort)));
                        continue_abort_dialog->set_message(&message);
                        continue_abort_dialog->show();
                        return false;
@@ -226,8 +233,10 @@
 void save_as_process_t::file_selected(const std::string *_name) {
        name = *_name;
        state = INITIAL;
-       if (file->get_highlight() == NULL && file->get_name() == NULL)
+       if (allow_highlight_change) {
+               highlight_changed = true;
                file->set_highlight(t3_highlight_load_by_filename(name.c_str(), 
map_highlight, NULL, T3_HIGHLIGHT_UTF8, NULL));
+       }
        run();
 }
 
@@ -252,7 +261,11 @@
        (new save_as_process_t(cb, _file))->run();
 }
 
-save_process_t::save_process_t(const callback_t &cb, file_buffer_t *_file) : 
save_as_process_t(cb, _file) {
+bool save_as_process_t::get_highlight_changed() const {
+       return highlight_changed;
+}
+
+save_process_t::save_process_t(const callback_t &cb, file_buffer_t *_file) : 
save_as_process_t(cb, _file, false) {
        if (file->get_name() != NULL)
                state = INITIAL;
 }
@@ -268,7 +281,6 @@
 }
 
 bool close_process_t::step(void) {
-
        if (state < CONFIRM_CLOSE) {
                if (save_process_t::step()) {
                        if (!result)
@@ -291,9 +303,10 @@
        } else if (state == CONFIRM_CLOSE) {
                string message;
                printf_into(&message, "Save changes to '%s'", file->get_name() 
== NULL ? "(Untitled)" : file->get_name());
-               
connections.push_back(close_confirm_dialog->connect_activate(sigc::mem_fun(this,
 &close_process_t::do_save), 0));
-               
connections.push_back(close_confirm_dialog->connect_activate(sigc::mem_fun(this,
 &close_process_t::dont_save), 1));
-               
connections.push_back(close_confirm_dialog->connect_activate(sigc::mem_fun(this,
 &close_process_t::abort), 2));
+               
connections.push_back(close_confirm_dialog->connect_activate(signals::mem_fun(this,
 &close_process_t::do_save), 0));
+               
connections.push_back(close_confirm_dialog->connect_activate(signals::mem_fun(this,
 &close_process_t::dont_save), 1));
+               
connections.push_back(close_confirm_dialog->connect_activate(signals::mem_fun(this,
 &close_process_t::abort), 2));
+               
connections.push_back(close_confirm_dialog->connect_closed(signals::mem_fun(this,
 &close_process_t::abort)));
                close_confirm_dialog->set_message(&message);
                close_confirm_dialog->show();
        } else {
@@ -327,9 +340,10 @@
                if ((*iter)->is_modified()) {
                        string message;
                        printf_into(&message, "Save changes to '%s'", 
(*iter)->get_name() == NULL ? "(Untitled)" : (*iter)->get_name());
-                       
connections.push_back(close_confirm_dialog->connect_activate(sigc::mem_fun(this,
 &exit_process_t::do_save), 0));
-                       
connections.push_back(close_confirm_dialog->connect_activate(sigc::mem_fun(this,
 &exit_process_t::dont_save), 1));
-                       
connections.push_back(close_confirm_dialog->connect_activate(sigc::mem_fun(this,
 &exit_process_t::abort), 2));
+                       
connections.push_back(close_confirm_dialog->connect_activate(signals::mem_fun(this,
 &exit_process_t::do_save), 0));
+                       
connections.push_back(close_confirm_dialog->connect_activate(signals::mem_fun(this,
 &exit_process_t::dont_save), 1));
+                       
connections.push_back(close_confirm_dialog->connect_activate(signals::mem_fun(this,
 &exit_process_t::abort), 2));
+                       
connections.push_back(close_confirm_dialog->connect_closed(signals::mem_fun(this,
 &exit_process_t::abort)));
                        close_confirm_dialog->set_message(&message);
                        close_confirm_dialog->show();
                        return false;
@@ -342,7 +356,7 @@
 }
 
 void exit_process_t::do_save(void) {
-       save_process_t::execute(sigc::mem_fun(this, 
&exit_process_t::save_done), *iter);
+       save_process_t::execute(signals::mem_fun(this, 
&exit_process_t::save_done), *iter);
 }
 
 void exit_process_t::dont_save(void) {
@@ -367,9 +381,9 @@
 
 bool open_recent_process_t::step(void) {
        if (state == SELECT_FILE) {
-               
connections.push_back(open_recent_dialog->connect_file_selected(sigc::mem_fun(this,
+               
connections.push_back(open_recent_dialog->connect_file_selected(signals::mem_fun(this,
                        &open_recent_process_t::recent_file_selected)));
-               
connections.push_back(open_recent_dialog->connect_closed(sigc::mem_fun(this, 
&open_recent_process_t::abort)));
+               
connections.push_back(open_recent_dialog->connect_closed(signals::mem_fun(this, 
&open_recent_process_t::abort)));
                open_recent_dialog->show();
                return false;
        }
@@ -402,8 +416,8 @@
                if (cli_option.encoding.is_valid()) {
                        if (cli_option.encoding == NULL) {
                                encoding_dialog->set_encoding("UTF-8");
-                               
encoding_dialog->connect_activate(sigc::mem_fun(this, 
&load_cli_file_process_t::encoding_selection_done));
-                               
encoding_dialog->connect_closed(sigc::mem_fun(this, 
&load_cli_file_process_t::run));
+                               
encoding_dialog->connect_activate(signals::mem_fun(this, 
&load_cli_file_process_t::encoding_selection_done));
+                               
encoding_dialog->connect_closed(signals::mem_fun(this, 
&load_cli_file_process_t::run));
                                encoding_dialog->show();
                                return false;
                        } else {
@@ -415,7 +429,7 @@
        in_step = true;
        while (iter != cli_option.files.end()) {
                in_load = true;
-               load_process_t::execute(sigc::mem_fun(this, 
&load_cli_file_process_t::load_done), *iter, encoding, true);
+               load_process_t::execute(signals::mem_fun(this, 
&load_cli_file_process_t::load_done), *iter, encoding, true);
                if (in_load) {
                        in_step = false;
                        return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/filestate.h new/tilde-0.3.7/src/filestate.h
--- old/tilde-0.3.4/src/filestate.h     2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/filestate.h     2016-02-23 08:20:17.000000000 +0100
@@ -16,7 +16,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <transcript/transcript.h>
-#include <sigc++/sigc++.h>
+#include <t3widget/signals.h>
 #include <t3widget/widget.h>
 
 #include "util.h"
@@ -115,6 +115,8 @@
                file_buffer_t *file;
                std::string name;
                std::string encoding;
+               bool allow_highlight_change;
+               bool highlight_changed;
 
                // State for save file_buffer_t::save function
                const char *save_name;
@@ -125,7 +127,7 @@
                file_write_wrapper_t *wrapper;
                struct stat file_info;
 
-               save_as_process_t(const callback_t &cb, file_buffer_t *_file);
+               save_as_process_t(const callback_t &cb, file_buffer_t *_file, 
bool _allow_highlight_change = true);
                virtual bool step(void);
                virtual void file_selected(const std::string *_name);
                virtual void encoding_selected(const std::string *_encoding);
@@ -133,6 +135,8 @@
 
        public:
                static void execute(const callback_t &cb, file_buffer_t *_file);
+
+               bool get_highlight_changed() const;
 };
 
 class save_process_t : public save_as_process_t {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/main.cc new/tilde-0.3.7/src/main.cc
--- old/tilde-0.3.4/src/main.cc 2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/main.cc 2016-02-23 08:20:17.000000000 +0100
@@ -84,7 +84,7 @@
                void set_default_options(void);
                void set_interface_options(void);
                void set_misc_options(void);
-               void set_highlight(t3_highlight_t *highlight);
+               void set_highlight(t3_highlight_t *highlight, const char *name);
                void save_as_done(stepped_process_t *process);
 };
 
@@ -98,7 +98,7 @@
        menu = new menu_bar_t(option.hide_menubar);
        menu->set_size(None, t3_win_get_width(window));
        push_back(menu);
-       menu->connect_activate(sigc::mem_fun(this, &main_t::menu_activated));
+       menu->connect_activate(signals::mem_fun(this, &main_t::menu_activated));
 
        panel = new menu_panel_t("_File", menu);
        panel->add_item("_New", "^N", action_id_t::FILE_NEW);
@@ -153,6 +153,7 @@
        panel->add_item("_Highlighting...", NULL, 
action_id_t::TOOLS_HIGHLIGHTING);
        panel->add_item("_Strip trailing spaces", NULL, 
action_id_t::TOOLS_STRIP_SPACES);
        panel->add_item("_Autocomplete", "C-Space", 
action_id_t::TOOLS_AUTOCOMPLETE);
+       panel->add_item("_Toggle line comment", "C-/", 
action_id_t::TOOLS_TOGGLE_LINE_COMMENT);
 
        panel = new menu_panel_t("_Options", menu);
        panel->add_item("Input _Handling...", NULL, action_id_t::OPTIONS_INPUT);
@@ -175,7 +176,7 @@
 
        select_buffer_dialog = new select_buffer_dialog_t(11, 
t3_win_get_width(window) - 4);
        select_buffer_dialog->center_over(this);
-       select_buffer_dialog->connect_activate(sigc::mem_fun(this, 
&main_t::switch_buffer));
+       select_buffer_dialog->connect_activate(signals::mem_fun(this, 
&main_t::switch_buffer));
 
        continue_abort_dialog = new message_dialog_t(MESSAGE_DIALOG_WIDTH, 
"Question", "_Continue", "_Abort", NULL);
        continue_abort_dialog->center_over(this);
@@ -187,13 +188,13 @@
        open_file_dialog->center_over(this);
        open_file_dialog->set_file(NULL);
        encoding_button = new button_t("_Encoding");
-       encoding_button->connect_activate(sigc::mem_fun(encoding_dialog, 
&encoding_dialog_t::show));
+       encoding_button->connect_activate(signals::mem_fun(encoding_dialog, 
&encoding_dialog_t::show));
        open_file_dialog->set_options_widget(encoding_button);
 
        save_as_dialog = new save_as_dialog_t(t3_win_get_height(window) - 4, 
t3_win_get_width(window) - 4);
        save_as_dialog->center_over(this);
        encoding_button = new button_t("_Encoding");
-       encoding_button->connect_activate(sigc::mem_fun(encoding_dialog, 
&encoding_dialog_t::show));
+       encoding_button->connect_activate(signals::mem_fun(encoding_dialog, 
&encoding_dialog_t::show));
        save_as_dialog->set_options_widget(encoding_button);
 
        close_confirm_dialog = new message_dialog_t(MESSAGE_DIALOG_WIDTH, 
"Confirm", "_Yes", "_No", "_Cancel", NULL);
@@ -208,26 +209,26 @@
        about_dialog = new message_dialog_t(45, "About", "Close", NULL);
        about_dialog->center_over(this);
        about_dialog->set_max_text_height(13);
-       about_dialog->set_message("Tilde - The intuitive text editor\n\nVersion 
0.3.4\nCopyright (c) 2011-2012 G.P. Halkes\n\n" // @copyright
+       about_dialog->set_message("Tilde - The intuitive text editor\n\nVersion 
0.3.7\nCopyright (c) 2011-2012 G.P. Halkes\n\n" // @copyright
                "The Tilde text editor is licensed under the GNU General Public 
License version 3. "
                "You should have received a copy of the GNU General Public 
License along with this program. "
                "If not, see <http://www.gnu.org/licenses/>.");
 
        buffer_options_dialog = new buffer_options_dialog_t("Current Buffer");
        buffer_options_dialog->center_over(this);
-       buffer_options_dialog->connect_activate(sigc::mem_fun(this, 
&main_t::set_buffer_options));
+       buffer_options_dialog->connect_activate(signals::mem_fun(this, 
&main_t::set_buffer_options));
 
        default_options_dialog = new buffer_options_dialog_t("Buffer Defaults");
        default_options_dialog->center_over(this);
-       default_options_dialog->connect_activate(sigc::mem_fun(this, 
&main_t::set_default_options));
+       default_options_dialog->connect_activate(signals::mem_fun(this, 
&main_t::set_default_options));
 
        misc_options_dialog = new misc_options_dialog_t("Miscellaneous");
        misc_options_dialog->center_over(this);
-       misc_options_dialog->connect_activate(sigc::mem_fun(this, 
&main_t::set_misc_options));
+       misc_options_dialog->connect_activate(signals::mem_fun(this, 
&main_t::set_misc_options));
 
        highlight_dialog = new highlight_dialog_t(t3_win_get_height(window) - 
4, 40);
        highlight_dialog->center_over(this);
-       highlight_dialog->connect_language_selected(sigc::mem_fun(this, 
&main_t::set_highlight));
+       highlight_dialog->connect_language_selected(signals::mem_fun(this, 
&main_t::set_highlight));
 
        preserve_bom_dialog = new message_dialog_t(MESSAGE_DIALOG_WIDTH, 
"Question", "_Yes", "_No", NULL);
        preserve_bom_dialog->set_message("The file starts with a Byte Order 
Mark (BOM). "
@@ -237,7 +238,7 @@
 
        attributes_dialog = new attributes_dialog_t(ATTRIBUTES_DIALOG_WIDTH);
        attributes_dialog->center_over(this);
-       attributes_dialog->connect_activate(sigc::mem_fun(this, 
&main_t::set_interface_options));
+       attributes_dialog->connect_activate(signals::mem_fun(this, 
&main_t::set_interface_options));
 }
 
 main_t::~main_t(void) {
@@ -318,21 +319,21 @@
                                // Because set_file also selects the named file 
if possible, we need to reset the dialog
                                open_file_dialog->reset();
                        }
-                       load_process_t::execute(sigc::mem_fun(this, 
&main_t::switch_to_new_buffer));
+                       load_process_t::execute(signals::mem_fun(this, 
&main_t::switch_to_new_buffer));
                        break;
                }
 
                case action_id_t::FILE_CLOSE:
-                       close_process_t::execute(sigc::mem_fun(this, 
&main_t::close_cb), get_current()->get_text());
+                       close_process_t::execute(signals::mem_fun(this, 
&main_t::close_cb), get_current()->get_text());
                        break;
                case action_id_t::FILE_SAVE:
-                       save_process_t::execute(sigc::mem_fun(this, 
&main_t::save_as_done), get_current()->get_text());
+                       save_process_t::execute(signals::mem_fun(this, 
&main_t::save_as_done), get_current()->get_text());
                        break;
                case action_id_t::FILE_SAVE_AS:
-                       save_as_process_t::execute(sigc::mem_fun(this, 
&main_t::save_as_done), get_current()->get_text());
+                       save_as_process_t::execute(signals::mem_fun(this, 
&main_t::save_as_done), get_current()->get_text());
                        break;
                case action_id_t::FILE_OPEN_RECENT:
-                       open_recent_process_t::execute(sigc::mem_fun(this, 
&main_t::switch_to_new_buffer));
+                       open_recent_process_t::execute(signals::mem_fun(this, 
&main_t::switch_to_new_buffer));
                        break;
                case action_id_t::FILE_REPAINT:
                        t3_widget::redraw();
@@ -342,7 +343,7 @@
                        break;
 
                case action_id_t::FILE_EXIT:
-                       
exit_process_t::execute(sigc::ptr_fun(stepped_process_t::ignore_result));
+                       
exit_process_t::execute(signals::ptr_fun(stepped_process_t::ignore_result));
                        break;
 
                case action_id_t::EDIT_UNDO:
@@ -443,6 +444,9 @@
                case action_id_t::TOOLS_AUTOCOMPLETE:
                        get_current()->autocomplete();
                        break;
+               case action_id_t::TOOLS_TOGGLE_LINE_COMMENT:
+                       get_current()->get_text()->toggle_line_comment();
+                       break;
 
                case action_id_t::OPTIONS_INPUT:
                        configure_input(false);
@@ -541,14 +545,24 @@
        write_config();
 }
 
-void main_t::set_highlight(t3_highlight_t *highlight) {
+void main_t::set_highlight(t3_highlight_t *highlight, const char *name) {
        get_current()->get_text()->set_highlight(highlight);
+       if (name == NULL) {
+               get_current()->get_text()->set_line_comment(NULL);
+       } else {
+               std::map<std::string, std::string>::iterator iter = 
option.line_comment_map.find(name);
+               if (iter == option.line_comment_map.end())
+                       get_current()->get_text()->set_line_comment(NULL);
+               else
+                       
get_current()->get_text()->set_line_comment(iter->second.c_str());
+       }
        get_current()->force_redraw();
 }
 
 void main_t::save_as_done(stepped_process_t *process) {
-       (void) process;
        get_current()->draw_info_window();
+       if (reinterpret_cast<save_as_process_t 
*>(process)->get_highlight_changed())
+               get_current()->force_redraw();
 }
 
 static void configure_input(bool cancel_selects_default) {
@@ -563,8 +577,8 @@
        is_height = min(max(height - 3, 15), 3200 / is_width);
 
        input_selection = new input_selection_dialog_t(is_height, is_width);
-       
input_selection->connect_activate(sigc::bind(sigc::ptr_fun(input_selection_complete),
 true));
-       
input_selection->connect_closed(sigc::bind(sigc::ptr_fun(input_selection_complete),
 cancel_selects_default));
+       
input_selection->connect_activate(signals::bind(signals::ptr_fun(input_selection_complete),
 true));
+       
input_selection->connect_closed(signals::bind(signals::ptr_fun(input_selection_complete),
 cancel_selects_default));
        input_selection->center_over(main_window);
        input_selection->show();
        input_selection_dialog = input_selection;
@@ -685,6 +699,36 @@
        free(name);
 }
 
+static void terminate_handler(int sig) {
+       lprintf("received signal %d\n", sig);
+       t3_widget::async_safe_exit_main_loop(sig + 128);
+}
+
+static void setup_term_signal_handler(int sig) {
+       struct sigaction sa;
+       sa.sa_handler = ::terminate_handler;
+       sigemptyset(&sa.sa_mask);
+       sigaddset(&sa.sa_mask, sig);
+       sa.sa_flags = SA_RESETHAND;
+       sigaction(sig, &sa, NULL) ;
+}
+
+static void setup_ign_signal_handler(int sig) {
+       struct sigaction sa;
+       sa.sa_handler = SIG_IGN;
+       sigemptyset(&sa.sa_mask);
+       sigaddset(&sa.sa_mask, sig);
+       sa.sa_flags = 0;
+       sigaction(sig, &sa, NULL) ;
+}
+
+static void setup_signal_handlers() {
+       setup_term_signal_handler(SIGHUP);
+       setup_term_signal_handler(SIGTERM);
+       setup_ign_signal_handler(SIGUSR1);
+       setup_ign_signal_handler(SIGUSR2);
+}
+
 int main(int argc, char *argv[]) {
        complex_error_t result;
        init_parameters_t *params = init_parameters_t::create();
@@ -720,7 +764,7 @@
 
        delete params;
 
-       connect_update_notification(sigc::ptr_fun(sync_updates));
+       connect_update_notification(signals::ptr_fun(sync_updates));
 
        init_charsets();
        main_window = new main_t();
@@ -772,15 +816,16 @@
                        "- must press escape twice to close a menu or 
dialog\n\n"
                        "You can change the input handling by selecting the 
\"Options\" menu "
                        "and choosing \"Input Handling\", or by choosing 
\"Configure\" below.");
-               
input_message->connect_activate(sigc::bind(sigc::ptr_fun(input_selection_complete),
 true), 0);
-               
input_message->connect_activate(sigc::bind(sigc::ptr_fun(configure_input), 
true), 1);
-               
input_message->connect_closed(sigc::bind(sigc::ptr_fun(input_selection_complete),
 true));
+               
input_message->connect_activate(signals::bind(signals::ptr_fun(input_selection_complete),
 true), 0);
+               
input_message->connect_activate(signals::bind(signals::ptr_fun(configure_input),
 true), 1);
+               
input_message->connect_closed(signals::bind(signals::ptr_fun(input_selection_complete),
 true));
                input_message->center_over(main_window);
                input_message->show();
                input_selection_dialog = input_message;
        }
 
-       load_cli_file_process_t::execute(sigc::mem_fun(main_window, 
&main_t::load_cli_files_done));
+       load_cli_file_process_t::execute(signals::mem_fun(main_window, 
&main_t::load_cli_files_done));
+       setup_signal_handlers();
        int retval = main_loop();
 #ifdef TILDE_DEBUG
        delete continue_abort_dialog;
@@ -801,5 +846,8 @@
                unlink(runfile_name);
                free(runfile_name);
        }
+       if (retval > 128) {
+               fprintf(stderr, "Killed by signal %d\n", retval - 128);
+       }
        return retval;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/option.cc new/tilde-0.3.7/src/option.cc
--- old/tilde-0.3.4/src/option.cc       2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/option.cc       2016-02-23 08:20:17.000000000 +0100
@@ -76,6 +76,10 @@
 #include "config.bytes"
 };
 
+static const char base_config_schema[] = {
+#include "config.bytes"
+};
+
 static t3_bool find_term_config(const t3_config_t *config, const void *data) {
        if (t3_config_get_type(config) != T3_CONFIG_SECTION)
                return t3_false;
@@ -95,7 +99,7 @@
 
        if (strncmp(attr, "fg ", 3) == 0)
                foreground = true;
-       else if (strncmp(attr, "bg", 3) == 0)
+       else if (strncmp(attr, "bg ", 3) == 0)
                foreground = false;
        else
                return 0;
@@ -180,6 +184,40 @@
        }
 }
 
+static void read_base_config(void) {
+       cleanup_func2_ptr<FILE, int, fclose>::t config_file;
+       t3_config_error_t error;
+       cleanup_func_ptr<t3_config_t, t3_config_delete>::t config;
+       cleanup_func_ptr<t3_config_schema_t, t3_config_delete_schema>::t schema;
+
+       if ((config_file = fopen(DATADIR "/" "base.config", "r")) == NULL) {
+               lprintf("Failed to open file: %s %m\n", DATADIR "/" 
"base.config");
+               return;
+       }
+
+       if ((config = t3_config_read_file(config_file, &error, NULL)) == NULL) {
+               lprintf("Error loading base config: %d: %s\n", 
error.line_number, t3_config_strerror(error.error));
+               return;
+       }
+
+       if ((schema = t3_config_read_schema_buffer(base_config_schema, 
sizeof(base_config_schema), &error, NULL)) == NULL) {
+               lprintf("Error loading schema: %d: %s\n", error.line_number, 
t3_config_strerror(error.error));
+               return;
+       }
+
+       if (!t3_config_validate(config, schema, &error, 0)) {
+               lprintf("Error validating base config: %d: %s\n", 
error.line_number, t3_config_strerror(error.error));
+               return;
+       }
+
+       for (t3_config_t *lang = t3_config_get(t3_config_get(config, "lang"), 
NULL); lang != NULL; lang = t3_config_get_next(lang)) {
+               const char *name = t3_config_get_string(t3_config_get(lang, 
"name"));
+               const char *line_comment = 
t3_config_get_string(t3_config_get(lang, "line_comment"));
+               if (name != NULL && line_comment != NULL)
+                       option.line_comment_map[std::string(name)] = 
line_comment;
+       }
+}
+
 static void read_config(void) {
        cleanup_func2_ptr<FILE, int, fclose>::t config_file;
        t3_config_error_t error;
@@ -218,10 +256,6 @@
                return;
        }
 
-       /* Note: when supporting later versions, read the config_version key 
here.
-             t3_config_get_int(t3_config_get(config, "config_version"))
-       */
-
        if (!t3_config_validate(config, schema, &error, 0)) {
                config_read_error = true;
                config_read_error_string = t3_config_strerror(error.error);
@@ -245,6 +279,13 @@
        GET_OPT(max_recent_files, INT, int);
        #undef opts
 
+       for (t3_config_t *lang = t3_config_get(t3_config_get(config, "lang"), 
NULL); lang != NULL; lang = t3_config_get_next(lang)) {
+               const char *name = t3_config_get_string(t3_config_get(lang, 
"name"));
+               const char *line_comment = 
t3_config_get_string(t3_config_get(lang, "line_comment"));
+               if (name != NULL && line_comment != NULL)
+                       option.line_comment_map[std::string(name)] = 
line_comment;
+       }
+
        if ((term_specific_config = t3_config_get(config, "terminals")) == NULL)
                return;
 
@@ -331,7 +372,7 @@
 }
 
 static void print_version(void) {
-       printf("Tilde version 0.3.4\n"
+       printf("Tilde version 0.3.7\n"
                "Copyright (c) 2011-2012 G.P. Halkes\n" // @copyright
                "Tilde is licensed under the GNU General Public License version 
3\n");
        printf("Library versions:\n"
@@ -400,7 +441,11 @@
                cli_option.files.push_back(optcurrent);
        END_OPTIONS
 
+       read_base_config();
        read_config();
+/*     for (const auto &lc : option.line_comment_map) {
+               printf("Line comment config: %s: %s\n", lc.first.c_str(), 
lc.second.c_str());
+       }*/
 
        post_process_options();
 END_FUNCTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/option.h new/tilde-0.3.7/src/option.h
--- old/tilde-0.3.4/src/option.h        2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/option.h        2016-02-23 08:20:17.000000000 +0100
@@ -16,6 +16,8 @@
 
 #include <cstdlib>
 #include <list>
+#include <map>
+#include <string>
 #include <t3window/window.h>
 
 #include "util.h"
@@ -111,6 +113,8 @@
        optional<int> key_timeout;
        t3_attr_t highlights[MAX_HIGHLIGHTS];
        t3_attr_t brace_highlight;
+
+       std::map<std::string, std::string> line_comment_map;
 };
 
 enum attribute_key_t {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/util.cc new/tilde-0.3.7/src/util.cc
--- old/tilde-0.3.4/src/util.cc 2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/util.cc 2016-02-23 08:20:17.000000000 +0100
@@ -55,7 +55,7 @@
 void stepped_process_t::abort(void) { done(false); }
 
 void stepped_process_t::disconnect(void) {
-       for (list<sigc::connection>::iterator iter = connections.begin();
+       for (list<signals::connection>::iterator iter = connections.begin();
                        iter != connections.end(); iter++)
                (*iter).disconnect();
        connections.clear();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/tilde-0.3.4/src/util.h new/tilde-0.3.7/src/util.h
--- old/tilde-0.3.4/src/util.h  2015-02-12 08:14:40.000000000 +0100
+++ new/tilde-0.3.7/src/util.h  2016-02-23 08:20:17.000000000 +0100
@@ -17,7 +17,7 @@
 #include <limits.h>
 #include <string>
 #include <list>
-#include <sigc++/sigc++.h>
+#include <t3widget/signals.h>
 #include <t3window/window.h>
 
 #ifdef __GNUC__
@@ -72,8 +72,8 @@
 
 class stepped_process_t {
        protected:
-               std::list<sigc::connection> connections;
-               typedef sigc::slot<void, stepped_process_t *> callback_t;
+               std::list<t3_widget::signals::connection> connections;
+               typedef t3_widget::signals::slot<void, stepped_process_t *> 
callback_t;
                callback_t done_cb;
                bool result;
 


Reply via email to