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
130
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
390
My Recent Emacs Works
syohex
0
200
Emacs Introduction at LLDiver
syohex
2
3.2k
Recent Emacs Work
syohex
2
780
Introduce git-gutter.el
syohex
1
510
websocket.el and its demo applications
syohex
0
1.2k
Other Decks in Programming
See All in Programming
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
560
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
330
WindowInsetsだってテストしたい
ryunen344
1
190
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
220
AIネイティブなプロダクトをGolangで挑む取り組み
nmatsumoto4
0
120
Select API from Kotlin Coroutine
jmatsu
1
180
Create a website using Spatial Web
akkeylab
0
290
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
11
2.8k
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
380
複数アプリケーションを育てていくための共通化戦略
irof
10
4k
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
300
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
700
GraphQLとの向き合い方2022年版
quramy
46
14k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Fireside Chat
paigeccino
37
3.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
330
24k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Documentation Writing (for coders)
carmenintech
71
4.9k
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