diff options
author | Stefan Monnier <[email protected]> | 2002-03-04 01:39:29 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2002-03-04 01:39:29 +0000 |
commit | cb30255a8355e0c8f3eab3431129f2385121a8bf (patch) | |
tree | 37114150d76776186568964776a35033c3a52580 /lisp/textmodes | |
parent | b8c49a19feeb97b5d42cd19185e2dbbbd52ef92c (diff) |
(tex-guess-main-file): Handle the case where one of the buffers is narrowed.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/tex-mode.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 465cb98c04..43a26cf229 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1410,8 +1410,10 @@ ALL other buffers." ;; (or (easy-mmode-derived-mode-p 'latex-mode) ;; (easy-mmode-derived-mode-p 'plain-tex-mode)) (save-excursion - (goto-char (point-min)) - (re-search-forward header-re 10000 t))) + (save-restriction + (widen) + (goto-char (point-min)) + (re-search-forward header-re 10000 t)))) (throw 'found (expand-file-name buffer-file-name)))))))) (defun tex-main-file () |