Defining indentation specs for multi-arity functions

オープン
#501 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
emacs, emacs-lisp
領域
tooling

調査の方向性

エントリーポイント (put-clojure-indent ...) から始めて、インデント仕様がどのように解釈されるかを確認してください。right-body の位置が変化する場合に :last 仕様でどのように対応できるかを調査し、その後、issue にある 3 つの複数アリティの例に対して動作を検証してください。

索引モデルが issue の本文から書いたものです。

説明

I have a function (function, not macro. But I don't think it matters) with the following signatures:

[request payoff right-body]
[request response-data payoff right-body]
[request response-data includes payoff & right-body]

The correct indentation for these would be to indent right-body as a 'body' parameter.

Given that the position of right-body in the arglist varies, one cannot use a fixed number for (put-clojure-indent ...).

Is this a known problem?

Intuitively, I'd want to express indentation as (put-clojure-indent 'my-fn :last), :last being the thing to implement.

(By the way I don't like the original function to begin with, but I shouldn't refactor other people's code just because I can't indent it)

主要言語
Emacs Lisp
スター
1k
フォーク
249
平均マージ
1日 6時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

clojure-emacs/clojure-mode のほかの issue

clojure-emacs/clojure-mode の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。