repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 21f155a3dee6dc27fbc4dbc4b1e07efc865a0d15:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 21f155a3dee6dc27fbc4dbc4b1e07efc865a0d15
Author: Marc Lehmann 
Date:   Fri Dec 26 19:19:30 2014 +0000

    *** empty log message ***

diff --git a/Changes b/Changes
index fe4404d14bc8b41c08dacecf51f3cbbefa2586b6..
index ..2e2ba911516c5396b2a6d5896edb3169aabfede5 100644
--- a/Changes
+++ b/Changes
@@ -36,6 +36,11 @@ TODO IMPL: recalc bg always on bg colour change
 TODO: document typical actions in rxvt.1.pod keysyms
 TODO: warn with a graphical message when env has been modified

+TODO: axe :BINDING:, move to init hook
+TODO: no autloading for binding, maybe futgure for resource
+TODO: unbundle tabbed to other name, or maybe not...
+TODO: URxvt::Ext::Name::Part2 installs urxvt ext name-part2 and provides pod/manpage for URxvt::Ext::Name::Part2
+TODO: think aboiut actions - are thesy tetx vstrings (utf-8) or octets
 	- the "moa redraw 8-bit british vintage colour management" release.
 	- NOTICE: this release updates terminfo.
 	- fix pixel droppings on overdraw when a secondary core font has the
diff --git a/src/perl/searchable-scrollback b/src/perl/searchable-scrollback
index 6863a75abc05eef7e79aa791b58ddd7ecca3a10d..
index ..60f18522981a4d553bc246a2f729b9b3317c2859 100644
--- a/src/perl/searchable-scrollback
+++ b/src/perl/searchable-scrollback
@@ -39,7 +39,7 @@ sub on_init {
                 || $self->x_resource ("%")
                 || "M-s";

-   $self->bind_action ($hotkey, "searchable-scrollback:start")
+   $self->bind_action ($hotkey, "%:start")
       or warn "unable to register '$hotkey' as scrollback search start hotkey\n";

    ()
diff --git a/src/urxvt.pm b/src/urxvt.pm
index 4e538e98452191d9169f92d83d06a0836135d40a..
index ..be6f53c5d05f704c9d58d8672bf3982dd83be03c 100644
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -117,8 +117,10 @@ the C section below.

 =head2 META comments

-rxvt-unicode recognizes special comments in extensions that define
-different types of metadata:
+Rxvt-unicode recognizes special meta comments in extensions that define
+different types of metadata.
+
+Currently, it recxognises only one such comment:

 =over 4

@@ -128,14 +130,6 @@ The RESOURCE comment defines a resource used by the extension, where
 C is the resource name, C is the resource type, C
 or C, and C is the resource description.

-=item #:META:BINDING:sym:action
-
-The BINDING comment defines a default binding for an action provided
-by the extension, where C is the key combination that triggers
-the action, whose format is defined in the description of the
-B resource in the urxvt(1) manpage, and C is the name
-of the action method.
-
 =back

 =head2 Hooks
@@ -983,16 +977,25 @@ sub on {
    bless \%disable, "urxvt::extension::on_disable"
 }

+=item $self->bind_action ($hotkey, $action)
+
 =item $self->x_resource ($pattern)

 =item $self->x_resource_boolean ($pattern)

-These methods support an additional C<%> prefix when called on an
-extension object - see the description of these methods in the
-C class for details.
+These methods support an additional C<%> prefix for C<$action> or
+C<$pattern> when called on an extension object, compared to the
+C methods of the same name - see the description of these
+methods in the C class for details.

 =cut

+sub bind_action {
+   my ($self, $hotkey, $action) = @_;
+   $action =~ s/^%:/$_[0]{_name}:/;
+   $self->{term}->bind_action ($hotkey, $action)
+}
+
 sub x_resource {
    my ($self, $name) = @_;
    $name =~ s/^%(\.|$)/$_[0]{_name}$1/;
@@ -1343,11 +1346,26 @@ sub x_resource_boolean {
    $res =~ /^\s*(?:true|yes|on|1)\s*$/i ? 1 : defined $res && 0
 }

-=item $success = $term->bind_action ($key, $octets)
+=item $success = $term->bind_action ($key, $action)

 Adds a key binding exactly as specified via a C resource. See the
 C resource in the urxvt(1) manpage.

+To add default bindings for an extension, the extension should call C<<
+->bind_action >> on it's C hook for every such binding. Doing it
+in the C hook allows users the override or remove the the binding
+again.
+
+Example: the C by default binds itself
+on C, using C<< $self->bind_action >>, which calls C<<
+$term->bind_action >>.
+
+   sub init {
+      my ($self) = @_;
+
+      $self->bind_action ("M-s" => "%:start");
+   }
+
 =item $rend = $term->rstyle ([$new_rstyle])

 Return and optionally change the current rendition. Text that is output by

-----END OF PAGE-----