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
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
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
270
Performance Engineering for Everyone
elenatanasoiu
0
250
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
220
Datadog LLM Observabilityで実現する 安全なLLM Usage 管理
3150
0
130
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
120
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
190
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
130
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
symfony/aiとlaravel/boost
77web
0
110
1B+ /day規模のログを管理する技術
broadleaf
0
120
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Featured
See All Featured
Practical Orchestrator
shlominoach
191
11k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
210
The SEO identity crisis: Don't let AI make you average
varn
0
510
GitHub's CSS Performance
jonrohan
1033
470k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
440
Marketing to machines
jonoalderson
1
5.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Google's AI Overviews - The New Search
badams
0
1.1k
Facilitating Awesome Meetings
lara
57
7k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
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