1693 |
(let* ((file (or tex-main-file |
(let* ((file (or tex-main-file |
1694 |
;; Compatibility with AUCTeX. |
;; Compatibility with AUCTeX. |
1695 |
(with-no-warnings |
(with-no-warnings |
1696 |
(when (and (boundp 'TeX-master) (stringp TeX-master)) |
(when (boundp 'TeX-master) |
1697 |
(make-local-variable 'tex-main-file) |
(cond ((stringp TeX-master) |
1698 |
(setq tex-main-file TeX-master))) |
(make-local-variable 'tex-main-file) |
1699 |
|
(setq tex-main-file TeX-master)) |
1700 |
|
((and (eq TeX-master t) buffer-file-name) |
1701 |
|
(file-relative-name buffer-file-name))))) |
1702 |
;; Try to guess the main file. |
;; Try to guess the main file. |
1703 |
(if (not buffer-file-name) |
(if (not buffer-file-name) |
1704 |
(error "Buffer is not associated with any file") |
(error "Buffer is not associated with any file") |