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
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
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
190
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
680
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
750
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
360
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
550
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
140
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
Claude Codeログ基盤の構築
giginet
PRO
7
2.7k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
560
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
A Soul's Torment
seathinner
5
2.4k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
300
WENDY [Excerpt]
tessaabrams
9
36k
Chasing Engaging Ingredients in Design
codingconduct
0
140
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
630
Leo the Paperboy
mayatellez
4
1.5k
Discover your Explorer Soul
emna__ayadi
2
1.1k
New Earth Scene 8
popppiees
1
1.7k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
280
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