summaryrefslogtreecommitdiff
path: root/lisp/ido.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2007-11-06 12:25:06 +0000
committerJuanma Barranquero <lekktu@gmail.com>2007-11-06 12:25:06 +0000
commitedcc53d147fdf46574c360ab57f4f4d4ebb8d24a (patch)
tree841b3829d9d2118962595cd635d2a69251ca4e80 /lisp/ido.el
parentb5729367411bdbfe83e287c74fd090892c0f3619 (diff)
downloademacs-edcc53d147fdf46574c360ab57f4f4d4ebb8d24a.tar.gz
(ido-save-history): Write the history file in the current filename
coding system, and add `coding' file-local variable.
Diffstat (limited to 'lisp/ido.el')
-rw-r--r--lisp/ido.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 27e9d66e25c..3c6eb6c576e 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)
@@ -1305,10 +1305,13 @@ Value is an integer which is number of chars to right of prompt.")
(interactive)
(when (and ido-last-directory-list ido-save-directory-list-file)
(let ((buf (get-buffer-create " *ido session*"))
- (version-control 'never))
+ (version-control 'never)
+ (coding-system (or file-name-coding-system
+ default-file-name-coding-system)))
(unwind-protect
(with-current-buffer buf
(erase-buffer)
+ (setq buffer-file-coding-system coding-system)
(ido-pp 'ido-last-directory-list)
(ido-pp 'ido-work-directory-list)
(ido-pp 'ido-work-file-list)
@@ -1316,7 +1319,8 @@ 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 (format "\n;; Local Variables:\n;; coding: %s\n;; End:\n"
+ coding-system))
(write-file ido-save-directory-list-file nil))
(kill-buffer buf)))))