]> git.eshelyaron.com Git - emacs.git/commitdiff
Do not use find-file non-interactively
authorPhillip Lord <phillip.lord@russet.org.uk>
Fri, 20 Jan 2017 15:11:50 +0000 (15:11 +0000)
committerPhillip Lord <phillip.lord@russet.org.uk>
Sat, 21 Jan 2017 19:43:12 +0000 (19:43 +0000)
 * lisp/international/titdic-cnv (miscdic-convert): Use
   insert-file-contents in place of find-file.

lisp/international/titdic-cnv.el

index 6f65d491ed4b86498a361be098d678f20597d0b8..130bc742a51e0b41ec80ddb059a136daa94d0d08 100644 (file)
@@ -1167,11 +1167,14 @@ the generated Quail package is saved."
                    (if (eq coding 'iso-2022-cn-ext) "Chinese-CNS"
                      "Chinese-GB"))
                  "\" \"" title "\" t\n")
-         (let* ((coding-system-for-read
-                 (coding-system-change-eol-conversion coding 'unix))
-                (dicbuf (find-file-noselect filename)))
-           (funcall converter dicbuf name title)
-           (kill-buffer dicbuf))
+          (let ((coding-system-for-read
+                 (coding-system-change-eol-conversion coding 'unix))
+                (dstbuf (current-buffer)))
+            (with-temp-buffer
+              (insert-file-contents filename)
+              (let ((dicbuf (current-buffer)))
+                (with-current-buffer dstbuf
+                  (funcall converter dicbuf name title)))))
          (insert ";; Local Variables:\n"
                  ";; version-control: never\n"
                  ";; no-update-autoloads: t\n"