diff options
| -rw-r--r-- | lisp/desktop.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el index 197680470ee..7f2b6f1312e 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -832,7 +832,8 @@ This function always sets `desktop-enable' to t." | |||
| 832 | 'ignored))) | 832 | 'ignored))) |
| 833 | 833 | ||
| 834 | ;; ---------------------------------------------------------------------------- | 834 | ;; ---------------------------------------------------------------------------- |
| 835 | (defun desktop-buffer-file () "Load a file." | 835 | (defun desktop-buffer-file () |
| 836 | "Load a file." | ||
| 836 | (if desktop-buffer-file-name | 837 | (if desktop-buffer-file-name |
| 837 | (if (or (file-exists-p desktop-buffer-file-name) | 838 | (if (or (file-exists-p desktop-buffer-file-name) |
| 838 | (and desktop-missing-file-warning | 839 | (and desktop-missing-file-warning |
| @@ -843,6 +844,9 @@ This function always sets `desktop-enable' to t." | |||
| 843 | (condition-case nil | 844 | (condition-case nil |
| 844 | (switch-to-buffer buf) | 845 | (switch-to-buffer buf) |
| 845 | (error (pop-to-buffer buf))) | 846 | (error (pop-to-buffer buf))) |
| 847 | (and (not (eq major-mode desktop-buffer-major-mode)) | ||
| 848 | (functionp desktop-buffer-major-mode) | ||
| 849 | (funcall desktop-buffer-major-mode)) | ||
| 846 | buf) | 850 | buf) |
| 847 | 'ignored))) | 851 | 'ignored))) |
| 848 | 852 | ||
| @@ -940,7 +944,7 @@ This function always sets `desktop-enable' to t." | |||
| 940 | (cons 'case-fold-search cfs) | 944 | (cons 'case-fold-search cfs) |
| 941 | (cons 'case-replace cr) | 945 | (cons 'case-replace cr) |
| 942 | (cons 'overwrite-mode (car mim))))) | 946 | (cons 'overwrite-mode (car mim))))) |
| 943 | 947 | ||
| 944 | ;; ---------------------------------------------------------------------------- | 948 | ;; ---------------------------------------------------------------------------- |
| 945 | ;; When `desktop-enable' is non-nil and "--no-desktop" is not specified on the | 949 | ;; When `desktop-enable' is non-nil and "--no-desktop" is not specified on the |
| 946 | ;; command line, we do the rest of what it takes to use desktop, but do it | 950 | ;; command line, we do the rest of what it takes to use desktop, but do it |