Exemple #1
0
 def get_text(self):
     end = lisp.buffer_size() + 1
     old_min = lisp.point_min()
     old_max = lisp.point_max()
     narrowed = (old_min != 1 or old_max != end)
     if narrowed:
         lisp.narrow_to_region(1, lisp.buffer_size() + 1)
     try:
         return lisp.buffer_string()
     finally:
         if narrowed:
             lisp.narrow_to_region(old_min, old_max)
 def get_text(self):
     end = lisp.buffer_size() + 1
     old_min = lisp.point_min()
     old_max = lisp.point_max()
     narrowed = (old_min != 1 or old_max != end)
     if narrowed:
         lisp.narrow_to_region(1, lisp.buffer_size() + 1)
     try:
         return lisp.buffer_string()
     finally:
         if narrowed:
             lisp.narrow_to_region(old_min, old_max)
Exemple #3
0
 def _get_text(self):
     if not lisp.buffer_modified_p():
         return self._get_resource().read()
     end = lisp.buffer_size() + 1
     old_min = lisp.point_min()
     old_max = lisp.point_max()
     narrowed = (old_min != 1 or old_max != end)
     if narrowed:
         lisp.narrow_to_region(1, lisp.buffer_size() + 1)
     try:
         return lisp.buffer_string()
     finally:
         if narrowed:
             lisp.narrow_to_region(old_min, old_max)