From e290d997cdc9651538831525670b1c197b30380e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 10 Nov 2007 00:28:58 +0000 Subject: [PATCH] (ido-save-history): Write the history file in UTF-8, and add `coding' file-local variable. --- lisp/ChangeLog | 5 +++++ lisp/ido.el | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8785c9fbe3..1d1679b128c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-11-10 Juanma Barranquero + + * ido.el (ido-save-history): Write the history file in UTF-8, + and add `coding' file-local variable. + 2007-11-09 Juanma Barranquero * international/iso-cvt.el (iso-spanish, iso-german, iso-iso2tex) diff --git a/lisp/ido.el b/lisp/ido.el index ca44e99b594..9b1f6a634aa 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -449,7 +449,7 @@ in merged file and directory lists." ;(setq ido-ignore-files '("^ " "\\.c$" "\\.h$")) (defcustom ido-default-file-method 'raise-frame - "*How to visit a new file when using `ido-find-file'. + "*How to visit a new file when using `ido-find-file'. Possible values: `selected-window' Show new file in selected window `other-window' Show new file in another window (same frame) @@ -469,7 +469,7 @@ Possible values: :group 'ido) (defcustom ido-default-buffer-method 'raise-frame - "*How to switch to new buffer when using `ido-switch-buffer'. + "*How to switch to new buffer when using `ido-switch-buffer'. See `ido-default-file-method' for details." :type '(choice (const :tag "Show in selected window" selected-window) (const :tag "Show in other window" other-window) @@ -1309,6 +1309,7 @@ Value is an integer which is number of chars to right of prompt.") (unwind-protect (with-current-buffer buf (erase-buffer) + (setq buffer-file-coding-system 'utf-8) (ido-pp 'ido-last-directory-list) (ido-pp 'ido-work-directory-list) (ido-pp 'ido-work-file-list) @@ -1316,7 +1317,7 @@ Value is an integer which is number of chars to right of prompt.") (if (listp ido-unc-hosts-cache) (ido-pp 'ido-unc-hosts-cache) (insert "\n;; ----- ido-unc-hosts-cache -----\nt\n")) - (insert "\n") + (insert "\n;; Local Variables:\n;; coding: utf-8\n;; End:\n") (write-file ido-save-directory-list-file nil)) (kill-buffer buf))))) -- 2.39.2