Mercurial > emacs
comparison lisp/ido.el @ 69809:7dd2c54d4afb
(ido-mode): Set after ido-unc-hosts and ido-ignore-unc-host-regexps.
(ido-save-history): Save ido-unc-hosts-cache.
(ido-load-history): Load ido-unc-hosts-cache.
(ido-reread-directory): Refresh unc hosts cache in // dir.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 05 Apr 2006 14:17:08 +0000 |
parents | e44b79389d65 |
children | 7512e19cdda7 |
comparison
equal
deleted
inserted
replaced
69808:c2821caabd95 | 69809:7dd2c54d4afb |
---|---|
358 :set #'(lambda (symbol value) | 358 :set #'(lambda (symbol value) |
359 (ido-mode value)) | 359 (ido-mode value)) |
360 :initialize 'custom-initialize-set | 360 :initialize 'custom-initialize-set |
361 :require 'ido | 361 :require 'ido |
362 :link '(emacs-commentary-link "ido.el") | 362 :link '(emacs-commentary-link "ido.el") |
363 :set-after '(ido-save-directory-list-file) | 363 :set-after '(ido-save-directory-list-file |
364 ;; These clear ido-unc-hosts-cache, so set them | |
365 ;; before loading history file. | |
366 ido-unc-hosts ido-ignore-unc-host-regexps) | |
364 :type '(choice (const :tag "Turn on only buffer" buffer) | 367 :type '(choice (const :tag "Turn on only buffer" buffer) |
365 (const :tag "Turn on only file" file) | 368 (const :tag "Turn on only file" file) |
366 (const :tag "Turn on both buffer and file" both) | 369 (const :tag "Turn on both buffer and file" both) |
367 (const :tag "Switch off all" nil)) | 370 (const :tag "Switch off all" nil)) |
368 :group 'ido) | 371 :group 'ido) |
1278 (erase-buffer) | 1281 (erase-buffer) |
1279 (ido-pp 'ido-last-directory-list) | 1282 (ido-pp 'ido-last-directory-list) |
1280 (ido-pp 'ido-work-directory-list) | 1283 (ido-pp 'ido-work-directory-list) |
1281 (ido-pp 'ido-work-file-list) | 1284 (ido-pp 'ido-work-file-list) |
1282 (ido-pp 'ido-dir-file-cache "\n\n ") | 1285 (ido-pp 'ido-dir-file-cache "\n\n ") |
1286 (if (listp ido-unc-hosts-cache) | |
1287 (ido-pp 'ido-unc-hosts-cache) | |
1288 (insert "\n;; ----- ido-unc-hosts-cache -----\nt\n")) | |
1283 (insert "\n") | 1289 (insert "\n") |
1284 (write-file ido-save-directory-list-file nil)) | 1290 (write-file ido-save-directory-list-file nil)) |
1285 (kill-buffer buf))))) | 1291 (kill-buffer buf))))) |
1286 | 1292 |
1287 (defun ido-load-history (&optional arg) | 1293 (defun ido-load-history (&optional arg) |
1299 (insert-file-contents file) | 1305 (insert-file-contents file) |
1300 (condition-case nil | 1306 (condition-case nil |
1301 (setq ido-last-directory-list (read (current-buffer)) | 1307 (setq ido-last-directory-list (read (current-buffer)) |
1302 ido-work-directory-list (read (current-buffer)) | 1308 ido-work-directory-list (read (current-buffer)) |
1303 ido-work-file-list (read (current-buffer)) | 1309 ido-work-file-list (read (current-buffer)) |
1304 ido-dir-file-cache (read (current-buffer))) | 1310 ido-dir-file-cache (read (current-buffer)) |
1311 ido-unc-hosts-cache (read (current-buffer))) | |
1305 (error nil))) | 1312 (error nil))) |
1306 (kill-buffer buf))))) | 1313 (kill-buffer buf))))) |
1307 (ido-wash-history)) | 1314 (ido-wash-history)) |
1308 | 1315 |
1309 (defun ido-wash-history () | 1316 (defun ido-wash-history () |
2580 May be useful if cached version is no longer valid, but directory | 2587 May be useful if cached version is no longer valid, but directory |
2581 timestamp has not changed (e.g. with ftp or on Windows)." | 2588 timestamp has not changed (e.g. with ftp or on Windows)." |
2582 (interactive) | 2589 (interactive) |
2583 (if (and ido-mode (eq ido-cur-item 'file)) | 2590 (if (and ido-mode (eq ido-cur-item 'file)) |
2584 (progn | 2591 (progn |
2585 (ido-remove-cached-dir ido-current-directory) | 2592 (if (ido-is-unc-root) |
2593 (setq ido-unc-hosts-cache t) | |
2594 (ido-remove-cached-dir ido-current-directory)) | |
2586 (setq ido-text-init ido-text) | 2595 (setq ido-text-init ido-text) |
2587 (setq ido-rotate-temp t) | 2596 (setq ido-rotate-temp t) |
2588 (setq ido-exit 'refresh) | 2597 (setq ido-exit 'refresh) |
2589 (exit-minibuffer)))) | 2598 (exit-minibuffer)))) |
2590 | 2599 |