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