# HG changeset patch # User Eli Zaretskii # Date 1138389840 0 # Node ID 0927d6785ca771222ac023adb10a903564eb712a # Parent 01a242622a336a191fe864a795a68076f06545bf (latexenc-find-file-coding-system): Make sure latexenc-main-file is a regular file and is readable. diff -r 01a242622a33 -r 0927d6785ca7 lisp/international/latexenc.el --- a/lisp/international/latexenc.el Fri Jan 27 19:14:51 2006 +0000 +++ b/lisp/international/latexenc.el Fri Jan 27 19:24:00 2006 +0000 @@ -156,7 +156,8 @@ "") ".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) @@ -167,7 +168,7 @@ (setq latexenc-main-file (tex-guess-main-file))))) ;; if we found a master/main file get the coding system from it (if (and latexenc-main-file - (file-regular-p latexenc-main-file) + (file-regular-p latexenc-main-file) (file-readable-p latexenc-main-file)) (let* ((latexenc-dont-use-tex-guess-main-file-flag t) (latexenc-dont-use-TeX-master-flag t)