Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
782ea71a
Commit
782ea71a
authored
Feb 26, 2006
by
Kim F. Storm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ido-save-history, ido-load-history): Simplify. Don't
use find-file-noselect to avoid interference from other modes.
parent
a0eacbcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
30 deletions
+24
-30
lisp/ido.el
lisp/ido.el
+24
-30
No files found.
lisp/ido.el
View file @
782ea71a
...
...
@@ -1181,25 +1181,19 @@ it doesn't interfere with other minibuffer usage.")
(
defun
ido-save-history
()
"Save ido history and cache information between sessions."
(
interactive
)
(
if
(
and
ido-last-directory-list
ido-save-directory-list-file
)
(
save-excursion
(
save-window-excursion
(
if
(
find-buffer-visiting
ido-save-directory-list-file
)
(
kill-buffer
(
find-buffer-visiting
ido-save-directory-list-file
)))
(
if
(
file-exists-p
ido-save-directory-list-file
)
(
delete-file
ido-save-directory-list-file
))
(
set-buffer
(
let
((
enable-local-variables
nil
))
(
find-file-noselect
ido-save-directory-list-file
t
)))
(
goto-char
(
point-min
))
(
delete-region
(
point-min
)
(
point-max
))
(
ido-pp
'ido-last-directory-list
)
(
ido-pp
'ido-work-directory-list
)
(
ido-pp
'ido-work-file-list
)
(
ido-pp
'ido-dir-file-cache
"\n\n "
)
(
insert
"\n"
)
(
let
((
version-control
'never
))
(
when
(
and
ido-last-directory-list
ido-save-directory-list-file
)
(
let
((
buf
(
get-buffer-create
" *ido session*"
))
(
version-control
'never
))
(
unwind-protect
(
with-current-buffer
buf
(
erase-buffer
)
(
ido-pp
'ido-last-directory-list
)
(
ido-pp
'ido-work-directory-list
)
(
ido-pp
'ido-work-file-list
)
(
ido-pp
'ido-dir-file-cache
"\n\n "
)
(
insert
"\n"
)
(
write-file
ido-save-directory-list-file
nil
))
(
kill-buffer
(
current-buffer
)
)))))
(
kill-buffer
buf
)))))
(
defun
ido-load-history
(
&optional
arg
)
"Load ido history and cache information from previous session.
...
...
@@ -1209,18 +1203,18 @@ With prefix argument, reload history unconditionally."
(
let
((
file
(
expand-file-name
ido-save-directory-list-file
))
buf
)
(
when
(
file-readable-p
file
)
(
s
ave-excursion
(
save-window-excursion
(
setq
buf
(
set-buffer
(
let
((
enable-local-variables
nil
))
(
find-file-noselect
file
)))
)
(
goto-char
(
point-min
)
)
(
condition-case
nil
(
setq
ido-last-directory-list
(
read
(
current-buffer
))
ido-work-directory-list
(
read
(
current-buffer
))
ido-work-file-list
(
read
(
current-buffer
))
ido-dir-file-cache
(
read
(
current-buffer
)))
(
error
nil
)))
)
(
kill-buffer
buf
))))
(
s
etq
buf
(
get-buffer-create
" *ido session*"
))
(
unwind-protect
(
with-current-buffer
buf
(
erase-buffer
)
(
insert-file-contents
file
)
(
condition-case
nil
(
setq
ido-last-directory-list
(
read
(
current-buffer
))
ido-work-directory-list
(
read
(
current-buffer
))
ido-work-file-list
(
read
(
current-buffer
))
ido-dir-file-cache
(
read
(
current-buffer
)))
(
error
nil
)))
(
kill-buffer
buf
))))
)
(
ido-wash-history
))
(
defun
ido-wash-history
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment