0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Emacs Lisp 超初心者がコマンドを作ってみる 〜 Emacs Lisp スタイルチェッカ checkdoc 〜

Posted at

はじめに

今回のコマンド作成で .el ファイルのバッファを eval-buffer しようとしたときに、 今まで使っていた Emacs 26.3 では eval-buffer がそのまま走ったのですが、 Emacs 29.3 では代わりに checkdoc-eval-current-buffer が走りました。 ワーニングがゴロゴロ出てきてビックリ!しましたが、 Emacs Lisp のコーディングスタイルチェッカのようです。

何か

python でいうところの pycodestyle (旧 pep8)と同様に コーディングスタイルが標準に沿うにワーニングを出してくれるようです。

checkdoc.el が標準添付されているようです。

checkdoc-eval-current-buffer は、そもそも動かないとスタイルチェックもクソもないやろ、と、 まずは「 eval-buffer が通るのを確認してから、」 checkdoc するコマンドだそうです。

コーディングの標準に即して書きたいんだけどどの文書見ればいい?

python では pep8 とか関連文書に纏められていますが、 Emacs Lispではリファレンスマニュアルに書いてあります。

D.6 ドキュメント文字列のヒント

D.8 Emacsライブラリーのヘッダーの慣習

をご覧ください。

こちらさんを参考にさせてもらってます

今回はここまで。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?