37 |
;; - buffer-read-only |
;; - buffer-read-only |
38 |
;; - some local variables |
;; - some local variables |
39 |
|
|
40 |
;; To use this, first put these two lines in the bottom of your .emacs |
;; To use this, add these lines in the bottom of your .emacs file: |
|
;; file (the later the better): |
|
41 |
;; |
;; |
42 |
;; (desktop-load-default) |
;; (desktop-load-default) |
43 |
;; (desktop-read) |
;; (desktop-read) |
44 |
|
;; (setq desktop-enable t) |
45 |
;; |
;; |
46 |
;; Between these two lines you may wish to add something that updates the |
;; Between the first two lines you may wish to add something that updates the |
47 |
;; variables `desktop-globals-to-save' and/or `desktop-locals-to-save'. If |
;; variables `desktop-globals-to-save' and/or `desktop-locals-to-save'. If |
48 |
;; for instance you want to save the local variable `foobar' for every buffer |
;; for instance you want to save the local variable `foobar' for every buffer |
49 |
;; in which it is local, you could add the line |
;; in which it is local, you could add the line |
50 |
;; |
;; |
51 |
;; (setq desktop-locals-to-save (cons 'foobar desktop-locals-to-save)) |
;; (add-to-list 'desktop-locals-to-save 'foobar) |
52 |
;; |
;; |
53 |
;; To avoid saving excessive amounts of data you may also wish to add |
;; To avoid saving excessive amounts of data you may also wish to add |
54 |
;; something like the following |
;; something like the following |
397 |
desktop-enable |
desktop-enable |
398 |
(let ((exists (file-exists-p (expand-file-name desktop-base-file-name desktop-dirname)))) |
(let ((exists (file-exists-p (expand-file-name desktop-base-file-name desktop-dirname)))) |
399 |
(or |
(or |
400 |
(eq desktop-save 't) |
(eq desktop-save t) |
401 |
(and exists (memq desktop-save '(ask-if-new if-exists))) |
(and exists (memq desktop-save '(ask-if-new if-exists))) |
402 |
(and |
(and |
403 |
(or |
(or |