Changeset f6b319c for perlwrap.pm


Ignore:
Timestamp:
Apr 29, 2007, 6:27:30 PM (14 years ago)
Author:
Sam Hartman <hartmans@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d791cdb
Parents:
03cf6b9
Message:
Implement hackish support for the wordwrap filter in the perl styles.
Note that while I think the user-visible parts of this are reasonably
OK the implementation needs cleanup.


* perlconfig.c: Add should_wordwrap attribute to message hashes.  This
   is a hack; a better solution is to expose an arbitrary interface for
   doing filter matches from perl.  That proved to be more than I had
   time for.
* perlglue.xs: expose owl_text_wordwrap
* perlwrap.pm: use in the default style
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlwrap.pm

    r1cf32e7d rf6b319c  
    418418            BarnOwl::ModuleLoader->load_all;
    419419        };
    420         BarnOwl::error("Error loading modules: $@") if $@;
     420        BarnOwl::error("$@") if $@;
     421open TMP, ">/tmp/error";
     422print TMP $@;
     423
    421424    } else {
    422425        BarnOwl::error("Can't load BarnOwl::ModuleLoader, loadable module support disabled:\n$@");
     
    528531
    529532    my $body = $m->body;
     533    if ($m->{should_wordwrap}) {
     534      $body = BarnOwl::wordwrap($body, BarnOwl::getnumcols()-8);
     535    }
    530536    # replace newline followed by anything with
    531537    # newline plus four spaces and that thing.
Note: See TracChangeset for help on using the changeset viewer.