diff options
| author | Eli Zaretskii | 2006-01-27 19:24:00 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-01-27 19:24:00 +0000 |
| commit | 96a6ec17fe612074a1af084060301991b3bbda18 (patch) | |
| tree | b4cd5ddf2fbd3755671d83002ffb642a7c81696b | |
| parent | c5b46a65efae6616430889ee4abebf2f5629ca32 (diff) | |
| download | emacs-96a6ec17fe612074a1af084060301991b3bbda18.tar.gz emacs-96a6ec17fe612074a1af084060301991b3bbda18.zip | |
(latexenc-find-file-coding-system): Make sure latexenc-main-file is
a regular file and is readable.
| -rw-r--r-- | lisp/international/latexenc.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 17a9df20843..07f76477ffd 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el | |||
| @@ -156,7 +156,8 @@ coding system names is determined from `latex-inputenc-coding-alist'." | |||
| 156 | "") | 156 | "") |
| 157 | ".tex" ".ltx" ".dtx" ".drv")) | 157 | ".tex" ".ltx" ".dtx" ".drv")) |
| 158 | (if (and (null latexenc-main-file) ;Stop at first. | 158 | (if (and (null latexenc-main-file) ;Stop at first. |
| 159 | (file-exists-p (concat file ext))) | 159 | (file-regular-p (concat file ext)) |
| 160 | (file-readable-p (concat file ext))) | ||
| 160 | (setq latexenc-main-file (concat file ext))))))) | 161 | (setq latexenc-main-file (concat file ext))))))) |
| 161 | ;; try tex-modes tex-guess-main-file | 162 | ;; try tex-modes tex-guess-main-file |
| 162 | (when (and (not latexenc-dont-use-tex-guess-main-file-flag) | 163 | (when (and (not latexenc-dont-use-tex-guess-main-file-flag) |
| @@ -167,7 +168,7 @@ coding system names is determined from `latex-inputenc-coding-alist'." | |||
| 167 | (setq latexenc-main-file (tex-guess-main-file))))) | 168 | (setq latexenc-main-file (tex-guess-main-file))))) |
| 168 | ;; if we found a master/main file get the coding system from it | 169 | ;; if we found a master/main file get the coding system from it |
| 169 | (if (and latexenc-main-file | 170 | (if (and latexenc-main-file |
| 170 | (file-regular-p latexenc-main-file) | 171 | (file-regular-p latexenc-main-file) |
| 171 | (file-readable-p latexenc-main-file)) | 172 | (file-readable-p latexenc-main-file)) |
| 172 | (let* ((latexenc-dont-use-tex-guess-main-file-flag t) | 173 | (let* ((latexenc-dont-use-tex-guess-main-file-flag t) |
| 173 | (latexenc-dont-use-TeX-master-flag t) | 174 | (latexenc-dont-use-TeX-master-flag t) |