aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-03-04 01:39:29 +0000
committerStefan Monnier2002-03-04 01:39:29 +0000
commitcb30255a8355e0c8f3eab3431129f2385121a8bf (patch)
tree37114150d76776186568964776a35033c3a52580
parentb8c49a19feeb97b5d42cd19185e2dbbbd52ef92c (diff)
downloademacs-cb30255a8355e0c8f3eab3431129f2385121a8bf.tar.gz
emacs-cb30255a8355e0c8f3eab3431129f2385121a8bf.zip
(tex-guess-main-file): Handle the case where one of the buffers is narrowed.
-rw-r--r--lisp/textmodes/tex-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 465cb98c047..43a26cf2296 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1410,8 +1410,10 @@ ALL other buffers."
1410 ;; (or (easy-mmode-derived-mode-p 'latex-mode) 1410 ;; (or (easy-mmode-derived-mode-p 'latex-mode)
1411 ;; (easy-mmode-derived-mode-p 'plain-tex-mode)) 1411 ;; (easy-mmode-derived-mode-p 'plain-tex-mode))
1412 (save-excursion 1412 (save-excursion
1413 (goto-char (point-min)) 1413 (save-restriction
1414 (re-search-forward header-re 10000 t))) 1414 (widen)
1415 (goto-char (point-min))
1416 (re-search-forward header-re 10000 t))))
1415 (throw 'found (expand-file-name buffer-file-name)))))))) 1417 (throw 'found (expand-file-name buffer-file-name))))))))
1416 1418
1417(defun tex-main-file () 1419(defun tex-main-file ()