(desktop-kill, desktop-save, desktop-remove): Use expand-directory rather than
concat to construct desktop filename.
(desktop-kill, desktop-read, desktop-change-dir): Ensure desktop-dirname is a
directory name.
(desktop-change-dir): Fix bug when DIR was relative.
* desktop.el (desktop-create-buffer): Added (desktop-first-buffer) to
the let-statement to avoid the startup error that desktop-first-buffer
is undefined.
assigning it to desktop-dirname and default-directory.
(desktop-read): Put buffers existing prior to evaluating the desktop (and not
reused) at the end of the buffer list.
(desktop-create-buffer): Don't update desktop-first-buffer for old desktop
files.
Other cleanups.
Command line option --no-desktop introduced.
(desktop-read): Record buffers in the desktop file in
the same order as that in the buffer list,
(desktop-save): Put buffers in the order given in desktop file,
regardless of what handlers do.
(desktop-file-version): New variable. Version number of desktop
file format.
(desktop-create-buffer-form): Variable deleted.
(desktop-save): New customizable variable.
(desktop-kill): Changed to use `desktop-save'.
(desktop-file-name-format): New option: format in
which desktop file names should be saved.
(desktop-file-name): New function to convert a filename to the
format specified in `desktop-file-name-format'.
(desktop-create-buffer): Parameters renamed to descriptive
systematic names. These parameters are visible to handlers.
Renames:
ver -> desktop-file-version
mim -> desktop-buffer-minor-modes
pt -> desktop-buffer-point
mk -> desktop-buffer-mark
ro -> desktop-buffer-read-only
locals -> desktop-buffer-locals
(desktop-buffer-major-mode, desktop-buffer-file-name)
(desktop-buffer-name): Unused customizable variables deleted.
(desktop-buffer-misc): Unused variable deleted.
(desktop-save, desktop-buffer-dired-misc-data):
Use `desktop-file-name'.
(desktop-path): New customizable variable. List of directories in
which to lookup the desktop file. Replaces hardcoded list.
(desktop-globals-to-clear): New variable replaces hardcoded list.
(desktop-clear-preserve-buffers-regexp): New customizable variable.
(desktop-after-read-hook): New hook run after a desktop is read.
(desktop-no-desktop-file-hook): New hook when no desktop file found.
(desktop-change-dir): New function.
(desktop-save-in-load-dir): New function. Save desktop in
directory from witch it was loaded.
(desktop-revert): New function. Revert to the last loaded desktop.
(desktop-save-buffer-p): Use it.
Also, obey desktop-buffers-not-to-save even for non-file buffers.
(desktop-buffer-file): Use pop-to-buffer if switch-to-buffer fails.
(desktop-buffer-major-mode): Renamed from mam. Add defvar.
(desktop-buffer-file-name): Renamed from fn. Add defvar.
(desktop-buffer-name): Renamed from bn. Add defvar.
(desktop-create-buffer, desktop-buffer): Use new names.
of top-level in order to capture wildcards used.
(desktop-buffer-dired): Skip possible wildcard when checking
for directory existance. Use dired-insert-subdir, not
dired-maybe-insert-subdir.
ftp names by default -- from being put into desktop files.
(desktop-save-buffer-p): Check file name also.
(desktop-save-buffer-p): For directories loaded by dired consider the
directory to be the file name.
(desktop-locals-to-save): Add line-number-mode to be saved when local.
(desktop-remove): In case the desktop file cannot be deleted make sure that
the desktop system is still inactivated.
(desktop-kill): In case an error occurs when saving the desktop, offer to quit
regardless.
(desktop-save-buffer-p): Disregard case when testing file and buffer names
against regexps.
(desktop-buffer-dired): Display a warning if a directory no longer exists.
(desktop-save-hook): New variable.
(desktop-save): Run desktop-save-hook.
(desktop-clear): Clear search history.
(desktop-internal-v2s): Be more explicit when encountering an unprintable
value.