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
150
1
Share
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
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
540
websocket.el and its demo applications
syohex
0
1.2k
Other Decks in Programming
See All in Programming
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
1
480
Agent Skills を社内で育てる仕組み作り
jackchuka
1
2.4k
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
130
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
2.3k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
290
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
240
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
140
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
940
Cloudflare で始める Data Platform
ta93abe
0
300
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
720
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
340
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
210
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The SEO Collaboration Effect
kristinabergwall1
1
460
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
The Language of Interfaces
destraynor
162
26k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
sira's awesome portfolio website redesign presentation
elsirapls
0
250
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
54k
Discover your Explorer Soul
emna__ayadi
2
1.1k
First, design no harm
axbom
PRO
2
1.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
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