Commit 96a6ec17 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(latexenc-find-file-coding-system): Make sure latexenc-main-file is

a regular file and is readable.
parent c5b46a65
......@@ -156,7 +156,8 @@ coding system names is determined from `latex-inputenc-coding-alist'."
".tex" ".ltx" ".dtx" ".drv"))
(if (and (null latexenc-main-file) ;Stop at first.
(file-exists-p (concat file ext)))
(file-regular-p (concat file ext))
(file-readable-p (concat file ext)))
(setq latexenc-main-file (concat file ext)))))))
;; try tex-modes tex-guess-main-file
(when (and (not latexenc-dont-use-tex-guess-main-file-flag)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment