emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] fix/bootstrap-build-minimize-squash cfbaa8e 1/3: Do not us


From: Phillip Lord
Subject: [Emacs-diffs] fix/bootstrap-build-minimize-squash cfbaa8e 1/3: Do not use find-file non-interactively
Date: Sun, 29 Jan 2017 16:37:30 +0000 (UTC)

branch: fix/bootstrap-build-minimize-squash
commit cfbaa8ea3edc92bac460d78d3c067358ec733eed
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    Do not use find-file non-interactively
    
     * lisp/international/titdic-cnv (miscdic-convert): Use
       insert-file-contents in place of find-file.
---
 lisp/international/titdic-cnv.el |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 6f65d49..130bc74 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]