Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Introduction of creating Emacs Lisp Package
Syohei YOSHIDA
April 09, 2015
Programming
1
71
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.3k
Dynamic Module
syohex
1
270
My Recent Emacs Works
syohex
0
160
Emacs Introduction at LLDiver
syohex
2
3k
Recent Emacs Work
syohex
2
730
Introduce git-gutter.el
syohex
1
450
websocket.el and its demo applications
syohex
0
1.1k
Other Decks in Programming
See All in Programming
Untangling Coroutine Testing (Droidcon Berlin 2022)
zsmb
1
460
パラメタライズドテスト
ledsun
0
220
ふんわり理解するcontext
rukiadia
1
170
테라폼으로 ECR 관리하기 (How to Manage ECR with Terraform)
posquit0
0
520
Haskellでオブジェクト指向プログラミング
koheisakata
0
170
大規模プロダクトにLinterを導入し運用している話
hirokiotsuka
0
300
段階的な技術的負債の解消方法.pdf
ko2ic
2
850
OSS貢献を気軽にしたい Let's Go Talk #1
yuyaabo
2
230
kintoneでランダム取得を作ってみた(imoniCamp 2022-07-27)
shokun1108
0
130
ベストプラクティス・ドリフト
sssssssssssshhhhhhhhhh
0
200
プロダクトの成長とSREと
takuyatezuka
0
110
Efficient UI testing in Android
alexzhukovich
1
120
Featured
See All Featured
The Language of Interfaces
destraynor
148
21k
Creatively Recalculating Your Daily Design Routine
revolveconf
207
10k
From Idea to $5000 a Month in 5 Months
shpigford
373
44k
Keith and Marios Guide to Fast Websites
keithpitt
404
21k
The Art of Programming - Codeland 2020
erikaheidi
32
11k
Web development in the modern age
philhawksworth
197
9.3k
Producing Creativity
orderedlist
PRO
334
37k
Reflections from 52 weeks, 52 projects
jeffersonlam
337
17k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
119
28k
Done Done
chrislema
174
14k
The Web Native Designer (August 2011)
paulrobertlloyd
75
2k
What the flash - Photography Introduction
edds
62
10k
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