Index: lisp/international/latexenc.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/international/latexenc.el,v retrieving revision 1.11 diff -u -p -r1.11 latexenc.el --- lisp/international/latexenc.el 2 Dec 2005 13:24:11 -0000 1.11 +++ lisp/international/latexenc.el 22 Jan 2006 14:22:40 -0000 @@ -1,6 +1,6 @@ ;;; latexenc.el --- guess correct coding system in LaTeX files -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2006 Free Software Foundation, Inc. ;; Author: Arne J,Ax(Brgensen ;; Keywords: mule, coding system, latex @@ -156,7 +156,8 @@ coding system names is determined from ` "") ".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)