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
140
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
400
My Recent Emacs Works
syohex
0
200
Emacs Introduction at LLDiver
syohex
2
3.2k
Recent Emacs Work
syohex
2
790
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
Advanced Micro Frontends: Multi Version/ Framework Scenarios
manfredsteyer
PRO
0
150
Comparing decimals in Swift Testing
417_72ki
0
160
それ CLI フレームワークがなくてもできるよ / Building CLI Tools Without Frameworks
orgachem
PRO
17
3.6k
バイブコーディング超えてバイブデプロイ〜CloudflareMCPで実現する、未来のアプリケーションデリバリー〜
azukiazusa1
3
780
階層化自動テストで開発に機動力を
ickx
1
470
Scale out your Claude Code ~自社専用Agentで10xする開発プロセス~
yukukotani
2
520
AIコーディングエージェント全社導入とセキュリティ対策
hikaruegashira
15
9.3k
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
0
180
GitHub Copilotの全体像と活用のヒント AI駆動開発の最初の一歩
74th
6
1.7k
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
720
MCP連携で加速するAI駆動開発/mcp integration accelerates ai-driven-development
bpstudy
0
250
CIを整備してメンテナンスを生成AIに任せる
hazumirr
0
510
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
YesSQL, Process and Tooling at Scale
rocio
173
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Producing Creativity
orderedlist
PRO
346
40k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Gamification - CAS2011
davidbonilla
81
5.4k
Typedesign – Prime Four
hannesfritz
42
2.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Six Lessons from altMBA
skipperchong
28
3.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