切换国内源

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
    (defun dotspacemacs/user-init ()
      "Initialization function for user code.
    It is called immediately after `dotspacemacs/init', before layer configuration
    executes.
     This function is mostly useful for variables that need to be set
    before packages are loaded. If you are unsure, you should try in setting them in
    `dotspacemacs/user-config' first."
      (setq configuration-layer-elpa-archives
      '(("melpa-cn" . "http://elpa.emacs-china.org/melpa/")
        ("org-cn"   . "http://elpa.emacs-china.org/org/")
        ("gnu-cn"   . "http://elpa.emacs-china.org/gnu/")))
      )



  (setq configuration-layer-elpa-archives
        '(
          ("melpa-stable-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa-stable")
          ("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
          ("org-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
          ("gnu-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))

自定义 layer 教程

环境变量

  • SPACEMACSDIR