From 8ed3f570391db0dc719820d784b4112e4c0057b1 Mon Sep 17 00:00:00 2001 From: moculus Date: Fri, 4 Apr 2008 20:26:35 +0000 Subject: [PATCH] spell checking improved --HG-- branch : pmacs2 --- buffer.py | 3 ++- mode/latex.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/buffer.py b/buffer.py index 0c504a2..7b53dd2 100644 --- a/buffer.py +++ b/buffer.py @@ -459,7 +459,8 @@ class FileBuffer(Buffer): data = self.read() self.lines = data.split(self.nl) def reload(self): - self.open() + data = self.read() + self.set_data(data) def changed_on_disk(self): assert self.checksum is not None f = open(self.path) diff --git a/mode/latex.py b/mode/latex.py index 93f6eb0..45c3cb1 100644 --- a/mode/latex.py +++ b/mode/latex.py @@ -113,6 +113,7 @@ class LatexInsertSpace(TextInsertSpace): class LatexCheckSpelling(method.Method): """Check the spelling of the document via ispell -t""" def _execute(self, w, **vargs): - w.application.run_external('ispell', '-t', w.buffer.path) + w.application.run_external('ispell', '-M', '-t', w.buffer.path) + w.buffer.reload() install = Latex.install