晚上,
我正在尝试为以前从未安装过的 emacs 安装一个包。我正在使用以下指南https://realpython.com/emacs-the-best-python-editor/打算安装 elpy。
以下信息放在~/.emacs.d/init.el
;; .emacs.d/init.el
2
3;; ===================================
4;; MELPA Package Support
5;; ===================================
6;; Enables basic packaging support
7(require 'package)
8
9;; Adds the Melpa archive to the list of available repositories
10(add-to-list 'package-archives
11 '("melpa" . "http://melpa.org/packages/") t)
12
13;; Initializes the package infrastructure
14(package-initialize)
15
16;; If there are no archived package contents, refresh them
17(when (not package-archive-contents)
18 (package-refresh-contents))
;; Installs packages
21;;
22;; myPackages contains a list of package names
23(defvar myPackages
24 '(better-defaults
elpy ;; Set up some better Emacs defaults
25 material-theme ;; Theme
26 )
27 )
28
29;; Scans the list in myPackages
30;; If the package listed is not already installed, install it
31(mapc #'(lambda (package)
32 (unless (package-installed-p package)
33 (package-install package)))
34 myPackages)
;; ===================================
37;; Basic Customization
38;; ===================================
39
40(setq inhibit-startup-message t) ;; Hide the startup message
41(load-theme 'material t) ;; Load material theme
42(global-linum-mode t) ;; Enable line numbers globally
43;; ====================================
46;; Development Setup
47;; ====================================
48;; Enable elpy
49(elpy-enable)
50
51;; User-Defined init.el ends here
但是,当我在保存后加载时,我在 emacs 中抽出了这个。
Warning (initialization): An error occurred while loading ‘/Users/jay/.emacs.d/init.el’:
Symbol's function definition is void: t
有没有人遇到过这个问题?谢谢