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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
210
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
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
230
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
240
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
140
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
250
モダンOBSプラグイン開発
umireon
0
150
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
300
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
420
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
120
Claude Code Skill入門
mayahoney
0
400
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
190
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
180
Fireside Chat
paigeccino
42
3.8k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
Odyssey Design
rkendrick25
PRO
2
550
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
Test your architecture with Archunit
thirion
1
2.2k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
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