Open5
Emacs 設定記録
leaf.el 設定
- インストールコード(公式READMEよりコピー)
;; <leaf-install-code>
(eval-and-compile
(customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless (package-installed-p 'leaf)
(package-refresh-contents)
(package-install 'leaf))
(leaf leaf-keywords
:ensure t
:config
;; initialize leaf-keywords.el
(leaf-keywords-init)))
;; </leaf-install-code>
- 追加パッケージインストール(leaf関連)
参考
(leaf leaf-tree
:ensure t
:custom ((imenu-list-size . 30)
(imenu-list-position . 'left)))
(leaf leaf-convert :ensure t)
(leaf macrostep
:ensure t
:bind (("C-c e" . macrostep-expand)))
ここまでのinit.elは以下
;; <leaf-install-code>
(eval-and-compile
(customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless (package-installed-p 'leaf)
(package-refresh-contents)
(package-install 'leaf))
(leaf leaf-keywords
:ensure t
:config
;; initialize leaf-keywords.el
(leaf-keywords-init)))
;; </leaf-install-code>
(leaf leaf-tree
:ensure t
:custom ((imenu-list-size . 30)
(imenu-list-position . 'left)))
(leaf leaf-convert :ensure t)
(leaf macrostep
:ensure t
:bind (("C-c e" . macrostep-expand)))
これでemacsを再起動すると、init.elの末尾に以下が自動追記される。
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages '(macrostep leaf-convert leaf-tree leaf-keywords leaf)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
leafを使う上での参考記事
とりあえず、方針として、leaf hogeなどでパッケージ(外部、ビルトイン含め)を指定できるものはleafの構文で書くが、そのほかglobal-set-keyなどは従来のまま書く。
のちに、leafの書き方にする