切换国内源
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 教程
参考
定义 funcs.el
1
2
3
| (when (configuration-layer/package-used-p 'my-package)
(defun spacemacs/my-package-enable () ...)
(defun spacemacs/my-package-disable () ...))
|
作用
- 在 加载 某个 package 后再定义 函数 defun
packages.el
- layer/pre-init
- layer/init
- layer/post-init
文章作者
上次更新
2021-07-23
(01539ff)