(defconst win32-emacs
(eq system-type 'windows-nt)
"Are we running Emacs for Windows")
(eq system-type 'windows-nt)
"Are we running Emacs for Windows")
(defconst windows-host
(and (getenv "OS") (string-match "Windows" (getenv "OS")))
"Are we running from Windows")
(and (getenv "OS") (string-match "Windows" (getenv "OS")))
"Are we running from Windows")
(defconst win32-emacs_on_windows
(and win32-emacs windows-host)
"Are we running W32 Emacs launched from windows?")
(defconst username (getenv "USERNAME"))
(if win32-emacs_on_windows
(defvar elisp-path
(expand-file-name
(concat "c:/cygwin/home/" username "/elisp")))
(defvar elisp-path (expand-file-name "~/elisp"))
)
I use init.el only for platform-specific customizations, such as paths. All of my elisp functions, key bindings, mode customizations, etc are stored in a separate file ("my-init.el"), which I store in my Dropbox.
ReplyDeleteSo the standard init.el simply sets up load-path to the platform-specific location of my Dropbox, then calls (require 'my-init). It's beautiful simplicity, and when I make a change at one location (say, at home), it is immediately reflected everywhere else (say, at work).
Thanks for the suggestion. Does Dropbox work behind a http proxy? I use a custom rsync script to synchronize between systems.
ReplyDelete