159 |
(setq latexenc-main-file (concat file ext))))))) |
(setq latexenc-main-file (concat file ext))))))) |
160 |
;; try tex-modes tex-guess-main-file |
;; try tex-modes tex-guess-main-file |
161 |
(when (and (not latexenc-dont-use-tex-guess-main-file-flag) |
(when (and (not latexenc-dont-use-tex-guess-main-file-flag) |
162 |
(not latexenc-main-file) |
(not latexenc-main-file)) |
163 |
(fboundp 'tex-guess-main-file)) |
;; Use a separate `when' so the byte-compiler sees the fboundp. |
164 |
(let ((tex-start-of-header "\\\\document\\(style\\|class\\)")) |
(when (fboundp 'tex-guess-main-file) |
165 |
(setq latexenc-main-file (tex-guess-main-file)))) |
(let ((tex-start-of-header "\\\\document\\(style\\|class\\)")) |
166 |
|
(setq latexenc-main-file (tex-guess-main-file))))) |
167 |
;; if we found a master/main file get the coding system from it |
;; if we found a master/main file get the coding system from it |
168 |
(if (and latexenc-main-file |
(if (and latexenc-main-file |
169 |
(file-readable-p latexenc-main-file)) |
(file-readable-p latexenc-main-file)) |