;;
https://zhuanlan.zhihu.com/p/341512250(require 'package)
(setq package-enable-at-startup nil)
;; If called as part of loading ‘user-init-file’, set
;; ‘package-enable-at-startup’ to nil, to prevent accidentally
;; loading packages twice.
(setq package-check-signature nil) ;个别时候会出现签名校验失败
(setq package-archives '(("gnu" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")
("org" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
("melpa" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")))
;(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
; ("marmalade" . "http://marmalade-repo.org/packages/")
; ("melpa" . "http://melpa.milkbox.net/packages/")))
;;
https://emacs.stackexchange.com/questions/57596/getting-started-use-package-question#:~:text=If%20your%20version%20of%20Emacs%20%28M-x%20emacs-version%20RET%29,will%20effectively%20be%20called%20before%20user-init-file%20is%20loaded.
;; Also, since Emacs 27.1 "it is no longer necessary to call 'package-initialize' in your init file". Therefore, you should be able to safely remove (package-initialize) call or use it conditionally, such as:
;; (when (< emacs-major-version 27)
;; (package-initialize))
;;
https://emacs-china.org/t/topic/4088/3;; 比较确定的是,在使用 package- 系列函数(例如 (package-install 'dash)) 之前必需调用 (package-initialize)。
;; 有package.el的Emacs都不需要手动添加(package-initialize) Emacs启动的时候会自动运行的
(unless package--initialized (package-initialize t)) ;;(package-initialize)
--
FROM 117.147.21.*