source: perl/lib/BarnOwl/Editwin.pm @ 65fca7a0

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 65fca7a0 was 203dcda, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
Make text_{before,after}_point use new form for editwin functions.
  • Property mode set to 100644
File size: 806 bytes
Line 
1use warnings;
2use strict;
3
4=head1 NAME
5
6BarnOwl::Editwin
7
8=head1 DESCRIPTION
9
10Functions for interfacing with the BarnOwl editwin. Most of the
11functions in this module are defined in perlglue.xs; This module
12exists to provide Exporter hooks and documentation for them.
13
14=cut
15
16package BarnOwl::Editwin;
17use base qw(Exporter);
18
19our @EXPORT_OK = qw(text_before_point text_after_point replace
20                    point_move replace_region get_region
21                    save_excursion current_column point mark);
22our %EXPORT_TAGS = (all => \@EXPORT_OK);
23
24sub text_before_point {
25    save_excursion {
26        set_mark();
27        move_to_buffer_start();
28        get_region();
29    }
30}
31
32sub text_after_point {
33    save_excursion {
34        set_mark();
35        move_to_buffer_end();
36        get_region();
37    }
38}
39
401;
Note: See TracBrowser for help on using the repository browser.