]> git.eshelyaron.com Git - emacs.git/commitdiff
(latexenc-find-file-coding-system):
authorKenichi Handa <handa@m17n.org>
Wed, 9 Aug 2006 01:11:44 +0000 (01:11 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 9 Aug 2006 01:11:44 +0000 (01:11 +0000)
Fix for the case that the 2nd element of arg-list is a cons.

lisp/international/latexenc.el

index 25d56c1e9282e4aac2ec3d6861d77d5beb5559d8..58e8d6c88e8623c135554e5c411909c1506d1d1d 100644 (file)
@@ -138,8 +138,14 @@ coding system names is determined from `latex-inputenc-coding-alist'."
                ((and (require 'code-pages nil t) (coding-system-p sym)) sym)
                (t 'undecided)))
           ;; else try to find it in the master/main file
-          (let ((default-directory (file-name-directory (nth 1 arg-list)))
-                latexenc-main-file)
+
+         ;; Fixme: If the current file is in an archive (e.g. tar,
+         ;; zip), we should find the master file in that archive.
+         ;; But, that is not yet implemented.   -- K.Handa
+          (let ((default-directory (if (stringp (nth 1 arg-list))
+                                      (file-name-directory (nth 1 arg-list))
+                                    default-directory))
+               latexenc-main-file)
             ;; Is there a TeX-master or tex-main-file in the local variables
             ;; section?
             (unless latexenc-dont-use-TeX-master-flag