 (desktop-save-mode 1)
 
 ;; Automatically start server
-(server-start)
+(require 'server)
+(unless (server-running-p) (server-start))
 
 
 ;;-----------------------------------------------------------------------------


;; Org-mode
(setq org-mobile-directory "~/Dropbox/Apps/MobileOrg"
      org-replace-disputed-keys t)


;;-----------------------------------------------------------------------------

(setq-default indent-tabs-mode nil)
(add-hook 'before-save-hook 'delete-trailing-whitespace)

(custom-set-variables '(default-major-mode 'text-mode))


;;-----------------------------------------------------------------------------
;; Built-ins
