new font-switcher Perl extension
Marc Lehmann
schmorp at schmorp.de
Sat Jan 24 18:55:53 CET 2009
> > If you would allow redistribution under the same license as urxvt (GPLv2),
> > added the relevant documentation to uxvt.pm and could at least use a
> > similar coding style as the other code, i would happily include it,
> > though!
>
> Other than changing 2-column indents to 3-column, I couldn't see any
> major style clashes, so new version and patch against CVS HEAD both
> attached ... let me know if I missed anything.
> $term->{'font-switcher'}{'overlay'} = {
In general, no superfluous ()'s or quotes, like above. It follows that _
is preferred over -.
As a sidenode, %$term is fully yours - best call it $self, because there
is also $self->term, which is the terminal object - so there is no need
for the extra font-switcher indirection.
> unless (@font_list) {
> timed_popup($term, "font-switcher-list resource was empty", 2);
and spaces should be consistently before the (, not after or around. But
this case should not have parentheses at all.
> $term->resource('font', $new_font);
And here, =>-quoting would be prefered, as in font => $new_font, but that
is minor.
Looks good so far - I would be happy to add it to the next urxvt release with
if these were more consistent!
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
-=====/_/_//_/\_,_/ /_/\_\
More information about the rxvt-unicode
mailing list