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
150
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction of creating Emacs Lisp Package
Syohei YOSHIDA
April 09, 2015
More Decks by Syohei YOSHIDA
See All by Syohei YOSHIDA
yapc-hokkaido-2016
syohex
15
8.9k
Dynamic Module
syohex
1
440
My Recent Emacs Works
syohex
0
220
Emacs Introduction at LLDiver
syohex
2
3.2k
Recent Emacs Work
syohex
2
820
Introduce git-gutter.el
syohex
1
540
websocket.el and its demo applications
syohex
0
1.2k
Other Decks in Programming
See All in Programming
えっ!!コードを読まずに開発を!?
hananouchi
0
190
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
スマートグラスで並列バイブコーディング
hyshu
0
290
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
480
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
120
継続モナドとリアクティブプログラミング
yukikurage
3
500
act2-costs.pdf
sumedhbala
0
110
自作OSでスライド発表する
uyuki234
1
3.8k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
360
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
480
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
680
How STYLIGHT went responsive
nonsquared
100
6.2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The SEO identity crisis: Don't let AI make you average
varn
0
510
How to Ace a Technical Interview
jacobian
281
24k
The Limits of Empathy - UXLibs8
cassininazir
1
460
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
240
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Discover your Explorer Soul
emna__ayadi
2
1.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
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