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
160
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
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
440
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
150
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
450
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
140
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
230
継続モナドとリアクティブプログラミング
yukikurage
3
670
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
180
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.5k
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
130
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
4k
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
920
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
290
Featured
See All Featured
Docker and Python
trallard
47
4k
Raft: Consensus for Rubyists
vanstee
141
7.6k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
460
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
550
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
The Cult of Friendly URLs
andyhume
79
7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
330
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
450
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Art, The Web, and Tiny UX
lynnandtonic
304
22k
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