Avoid problems when calling desktop-read twice
* lisp/desktop.el (desktop-read): Don't reload the desktop file if it's already been loaded, because the later query may lead to desktop-dirname being set to nil (bug#9765).
This commit is contained in:
parent
8b1693f689
commit
0c330bed24
1 changed files with 7 additions and 1 deletions
|
@ -1222,7 +1222,13 @@ This function is a no-op when Emacs is running in batch mode.
|
|||
It returns t if a desktop file was loaded, nil otherwise.
|
||||
\n(fn DIRNAME)"
|
||||
(interactive "i\nP")
|
||||
(unless noninteractive
|
||||
(if (or noninteractive
|
||||
(and (desktop-owner)
|
||||
(= (desktop-owner) (emacs-pid))))
|
||||
(message "Not reloading the desktop%s"
|
||||
(if noninteractive
|
||||
""
|
||||
"; already loaded"))
|
||||
(setq desktop-dirname
|
||||
(file-name-as-directory
|
||||
(expand-file-name
|
||||
|
|
Loading…
Add table
Reference in a new issue