Skip to content

Instantly share code, notes, and snippets.

@cosysn
Last active April 9, 2017 11:48
Show Gist options
  • Save cosysn/41269fa767b7f0529802e65dbcb1a821 to your computer and use it in GitHub Desktop.
Save cosysn/41269fa767b7f0529802e65dbcb1a821 to your computer and use it in GitHub Desktop.
支持Windows下将 Spacemacs 放置在 HOME 目录外指定的目录下
;;; init.el --- Spacemacs Initialization File
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner [email protected]
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; https://emacs-china.org/t/package-package-is-unavailable-is-the-package-name-misspelled/2662
;; Without this comment emacs25 adds (package-initialize) here
;; (package-initialize)
;; Increase gc-cons-threshold, depending on your system you may set it back to a
;; lower value in your dotfile (function `dotspacemacs/user-config')
(defvar program-dir "h:/Dev/myEmacs/")
(setenv "HOME" program-dir)
(setenv "PATH" program-dir)
(setq default-directory "~/")
(load-file "~/.emacs.d/init.el")
@cosysn
Copy link
Author

cosysn commented Apr 9, 2017

灵感:

  1. 可以考虑支持不同的操作系统,目前主要是针对 Windows 平台;
  2. 实现 Spacemacs 配置文件不再依赖于 HOME 目录;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment