From 87c846d3bd8266428ce587ec14aff1728a54673b Mon Sep 17 00:00:00 2001 From: moculus Date: Tue, 11 Nov 2008 05:15:47 +0000 Subject: [PATCH] clear up when to REALLY use kill --HG-- branch : pmacs2 --- method/__init__.py | 4 ++-- mode/perl.py | 2 +- mode/python.py | 2 +- mode/search.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/method/__init__.py b/method/__init__.py index f3da555..0f309a4 100644 --- a/method/__init__.py +++ b/method/__init__.py @@ -252,7 +252,7 @@ class DeleteLeft(Method): line = w.buffer.lines[y] tabwidth = w.mode.tabwidth if x >= tabwidth and x % tabwidth == 0 and line[0:x].isspace(): - w.kill(Point(x - tabwidth, y), Point(x, y)) + w.delete(Point(x - tabwidth, y), Point(x, y)) else: w.left_delete() class DeleteRight(Method): @@ -262,7 +262,7 @@ class DeleteRight(Method): line = w.buffer.lines[cursor.y] lvl = w.mode.tabwidth if len(line[cursor.x:]) >= lvl and line[:cursor.x + lvl].isspace(): - w.kill(Point(cursor.x, cursor.y), Point(cursor.x + lvl, cursor.y)) + w.delete(Point(cursor.x, cursor.y), Point(cursor.x + lvl, cursor.y)) else: w.right_delete() class DeleteLeftWord(Method): diff --git a/mode/perl.py b/mode/perl.py index e47243b..c80a3a5 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -375,7 +375,7 @@ class PerlHashCleanup(Method): end_p = Point(0, end + 1) else: end_p = Point(len(w.buffer.lines[end]), end) - w.kill(start_p, end_p) + w.delete(start_p, end_p) w.insert_string(start_p, data) class PerlWrapParagraph(method.WrapParagraph): diff --git a/mode/python.py b/mode/python.py index 156199d..42c2b0e 100644 --- a/mode/python.py +++ b/mode/python.py @@ -296,7 +296,7 @@ class PythonDictCleanup(method.Method): end_p = Point(0, end + 1) else: end_p = Point(len(w.buffer.lines[-1]), len(w.buffer.lines) - 1) - w.kill(start_p, end_p) + w.delete(start_p, end_p) w.insert_string(start_p, data) class PythonInsertTripleSquotes(method.Method): diff --git a/mode/search.py b/mode/search.py index 2d58e81..c4c62af 100644 --- a/mode/search.py +++ b/mode/search.py @@ -67,7 +67,7 @@ class SearchDeleteLeft(method.Method): _post_delete(w) class SearchDeleteLeftWord(method.Method): def execute(self, w, **vargs): - w.kill_left_word() + w.delete_left_word() _post_delete(w) def _post_delete(w): old_cursor = w.buffer.method.old_cursor