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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Syohei YOSHIDA
April 09, 2015
Programming
1
150
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.9k
Dynamic Module
syohex
1
430
My Recent Emacs Works
syohex
0
200
Emacs Introduction at LLDiver
syohex
2
3.2k
Recent Emacs Work
syohex
2
800
Introduce git-gutter.el
syohex
1
530
websocket.el and its demo applications
syohex
0
1.2k
Other Decks in Programming
See All in Programming
NetBSD+Raspberry Piで 本物のPSGを鳴らすデモを OSC駆動の7日間で作った話 / OSC2026Osaka
tsutsui
1
120
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.2k
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
22
7.8k
AI & Enginnering
codelynx
0
140
あなたはユーザーではない #PdENight
kajitack
4
200
CSC307 Lecture 12
javiergs
PRO
0
440
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
650
2026年 エンジニアリング自己学習法
yumechi
0
150
株式会社 Sun terras カンパニーデック
sunterras
0
1.8k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
860
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
120
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
7
1.1k
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
120
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
RailsConf 2023
tenderlove
30
1.4k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Facilitating Awesome Meetings
lara
57
6.8k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
78
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
440
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The Language of Interfaces
destraynor
162
26k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.2k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
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