racket / racket/gui

Improper indentation of (let ([define-foo \n 'test]) …) with #lang scribble/lp2

Open
#28 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
68
Forks
82
PR merge metrics
No merged PRs in 30d

Description

From @jsmaniac on February 26, 2016 16:54

In the following program, the expression bound to define-foo is improperly indented

#lang scribble/lp2

@chunk[<*>
       (let ([define-foo
 'test])
         define-foo)]

Using #lang racket, the expression is indented as expected:

#lang racket

(let ([define-foo
        'test])
  define-foo)

This happens only with identifiers that match the "keywords that look like Define" regexp (or list), from the preferences. The actual code I have is binding define-foo with splicing-syntax-parameterize, which explains the otherwise weird name.

I am using today's 6.4.0.8 build (20160226-15f47ef).

Copied from original issue: racket/drracket#44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the two indentation examples in DrRacket, using #lang scribble/lp2 and an identifier matching the configured define-like keyword pattern, then compare with #lang racket. Done means the expression bound to define-foo is indented like the expected Racket example.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.