Changeset c6ecf5c for perl/lib


Ignore:
Timestamp:
Jul 11, 2009, 1:14:36 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
bd7fb58
Parents:
d41294a
git-author:
Nelson Elhage <nelhage@mit.edu> (06/21/09 01:12:01)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:36)
Message:
Implement text_{before,after)_point in Perl.

These can easily be implemented in perl using save_excursion and
get_region, so there's no need for them in C.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Editwin.pm

    rd41294a rc6ecf5c  
    2121                    save_excursion current_column point mark);
    2222
     23sub text_before_point {
     24    save_excursion {
     25        BarnOwl::command('edit:set-mark');
     26        BarnOwl::command('edit:move-to-buffer-start');
     27        get_region();
     28    }
     29}
     30
     31sub text_after_point {
     32    save_excursion {
     33        BarnOwl::command('edit:set-mark');
     34        BarnOwl::command('edit:move-to-buffer-end');
     35        get_region();
     36    }
     37}
     38
    23391;
Note: See TracChangeset for help on using the changeset viewer.