summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Lord <phillip.lord@russet.org.uk>2017-01-20 15:11:50 +0000
committerPhillip Lord <phillip.lord@russet.org.uk>2017-02-28 21:12:59 +0000
commit514a14ffd826e2686a106f45b7e7495ab42fe12e (patch)
tree19f7ae33643a1dc3090fc52c693cac7573686c56
parentc2469c50e80f4a18448e6f5f45e960cf00944822 (diff)
downloademacs-514a14ffd826e2686a106f45b7e7495ab42fe12e.tar.gz
Do not use find-file non-interactively
* lisp/international/titdic-cnv (miscdic-convert): Use insert-file-contents in place of find-file.
-rw-r--r--lisp/international/titdic-cnv.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 6f65d491ed4..130bc742a51 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"