maeshimaの日記

メモ書きです

rinariコードリーディング rinari-rake

一年弱ぶりに再開。interactiveの引数"P"が気になったので調べた。

(defun rinari-rake (&optional task edit-cmd-args)
  "Tab completion selection of a rake task to execute with the
output dumped to a compilation buffer allowing jumping between
errors and source code.  With optional prefix argument allows
editing of the rake command arguments."
  (interactive "P")
  (ruby-compilation-rake task edit-cmd-args
			 (if rinari-rails-env (list (cons "RAILS_ENV" rinari-rails-env)))))

GNU Emacs Lispリファレンスマニュアル: コマンドループ

によると、コマンドで該当する関数を呼び出すときの引数の種類を、interactiveの引数で指定している。"P"は「入出力なし」だそうな。