From 034a48f4d34a43f7599b71369c561227767304f9 Mon Sep 17 00:00:00 2001 From: Markus Rost Date: Wed, 1 Dec 2004 04:08:34 +0000 Subject: [PATCH] (tex-main-file): Add a compatibility with AUCTeX. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/tex-mode.el | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5be7b062ef..491bfe9ace4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-30 Markus Rost + + * textmodes/tex-mode.el (tex-main-file): Add a compatibility with + AUCTeX. + 2004-11-30 Jay Belanger * calc/calc-arith.el (math-possible-signs): Made stronger checks diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index cb5bf24badd..91b3d2afdfd 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1693,9 +1693,12 @@ of the current buffer." (let* ((file (or tex-main-file ;; Compatibility with AUCTeX. (with-no-warnings - (when (and (boundp 'TeX-master) (stringp TeX-master)) - (make-local-variable 'tex-main-file) - (setq tex-main-file TeX-master))) + (when (boundp 'TeX-master) + (cond ((stringp TeX-master) + (make-local-variable 'tex-main-file) + (setq tex-main-file TeX-master)) + ((and (eq TeX-master t) buffer-file-name) + (file-relative-name buffer-file-name))))) ;; Try to guess the main file. (if (not buffer-file-name) (error "Buffer is not associated with any file") -- 2.39.5