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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
450
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.3k
Other Decks in Programming
See All in Programming
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
340
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
420
高専キャリア LT 発表内容
crysta1221
6
5.4k
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
360
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
590
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
100
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
170
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
49
31k
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
120
リアルな遅延を測る仕様
kota_yata
1
130
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
130
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
RailsConf 2023
tenderlove
30
1.5k
Evolving SEO for Evolving Search Engines
ryanjones
0
270
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Producing Creativity
orderedlist
PRO
348
41k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
The Language of Interfaces
destraynor
162
27k
Building AI with AI
inesmontani
PRO
1
1.2k
Chasing Engaging Ingredients in Design
codingconduct
0
290
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
500
Site-Speed That Sticks
csswizardry
13
1.5k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
260
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