Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction of creating Emacs Lisp Package
Search
Syohei YOSHIDA
April 09, 2015
Programming
1
140
Introduction of creating Emacs Lisp Package
Syohei YOSHIDA
April 09, 2015
Tweet
Share
More Decks by Syohei YOSHIDA
See All by Syohei YOSHIDA
yapc-hokkaido-2016
syohex
15
8.8k
Dynamic Module
syohex
1
400
My Recent Emacs Works
syohex
0
200
Emacs Introduction at LLDiver
syohex
2
3.2k
Recent Emacs Work
syohex
2
790
Introduce git-gutter.el
syohex
1
520
websocket.el and its demo applications
syohex
0
1.2k
Other Decks in Programming
See All in Programming
tool ディレクティブを導入してみた感想
sgash708
1
160
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
17
9.4k
フロントエンドのmonorepo化と責務分離のリアーキテクト
kajitack
2
150
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.4k
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
760
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
790
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
110
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
290
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
4
1.5k
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
180
令和最新版手のひらコンピュータ
koba789
14
8.2k
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
1
180
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
910
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Producing Creativity
orderedlist
PRO
347
40k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Designing Experiences People Love
moore
142
24k
Transcript
パッケージ作成
はじめに • “info elisp” の Packaging の章を読みましょう
チェック項目 • ヘッダ , フッタは適正か • メタ情報は適切か • 必要最低限の環境でどうさするか •
バイトコンパイル時に警告 , エラーが出ないか
ヘッダ / フッタ • 1 行目は ファイル名 --- 概要 概要は
M-x list-packages Desription カラムに表示 される • 最終行は ;;; ファイル名 ends here
メタ情報 • 作者 • バージョン • 依存関係 • パッケージコメント
必要最低限の環境で動作するか • Cask を使おう (el-get でも可 ) – bundler 的なもの
– 依存関係を記述 • cask exec emacs -Q -l my-package.el としてエラーが出なければ依存関係は適切 ( 特定の関数実行時にロードする場合は除く )
Cask ファイル例 ;; repository (source gnu) (source melpa) ;; read
dependencies from helm-ag.el (package-file "helm-ag.el") (development (depends-on "ert") (depends-on "helm-projectile"))
バイトコンパイル • 変数名 , 関数名の typo の検知 • lexical-binding が有効だと未使用変数も指摘
• deprecated, obsoleted な関数 , 変数の指摘 • バイトコンパイル時も cask exec emacs -Q
名前付け ( 関数 , マクロ , 変数 ) • Emacs
には名前空間が一つしかない – 安易な名前は容易に衝突する • パッケージ名を各名前のプレフィックスに使う • 名前が長くなるが , 補完を使えば耐えられる – 重複するパッケージがないか事前に確認仕様 • melpa, el-get のレシピ名を確認
•遅延ロード対応 • 必要な関数に autoload cookie をつける ;;;###autoload ← 該当する S
式の前に追加する
テスト • テストパッケージは標準 • travis-ci 等の CI サービスの利用も難しくない
Enjoy Emacs Lisp Hacking