changeset 79359:53328e172cbc

(ido-save-history): Write the history file in UTF-8, and add `coding' file-local variable.
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 10 Nov 2007 00:27:50 +0000
parents 5bb58f3a8da8
children 8da2b1761937
files lisp/ido.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ido.el	Fri Nov 09 16:59:24 2007 +0000
+++ b/lisp/ido.el	Sat Nov 10 00:27:50 2007 +0000
@@ -449,7 +449,7 @@
 ;(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 @@
     :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 @@
       (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 @@
 	    (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)))))