Port to Emacs 22.x.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 18 Jun 2011 11:28:54 +0300
changeset 644 a44f5abb820f
parent 643 bfb236f0ef44
child 645 f5a8fa2c4534
Port to Emacs 22.x.
.emacs-my
--- a/.emacs-my	Sat Jun 18 11:14:06 2011 +0300
+++ b/.emacs-my	Sat Jun 18 11:28:54 2011 +0300
@@ -246,12 +246,16 @@
   (require 'server)
   (when (and (= emacs-major-version 23) (>= emacs-minor-version 1) (<= emacs-minor-version 2) (equal window-system 'w32))
     (defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error directory ~/.emacs.d/server is unsafe on windows.
-  (unless (server-running-p server-name)
+  (unless (or (<= emacs-major-version 22) (server-running-p server-name))
     (server-start))
   )
 
-;; (desktop-load-default)
-;; (desktop-read)
+;;; ----------------------------------------------------------------
+;; Save and restore my buffers every time.
+(setq desktop-dirname "~/.emacs.d")
+(when (>= emacs-major-version 22)
+  (desktop-save-mode 1)
+  )
 
 ;;; ----------------------------------------------------------------
 (message "standart/general settings")