+2004-11-30 Markus Rost <rost@ias.edu>
+
+ * textmodes/tex-mode.el (tex-main-file): Add a compatibility with
+ AUCTeX.
+
2004-11-30 Jay Belanger <belanger@truman.edu>
* calc/calc-arith.el (math-possible-signs): Made stronger checks
(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")