schemely icon indicating copy to clipboard operation
schemely copied to clipboard

Identifiers starting with N- (being N a number) are not caught by cmd+W

Open rubenbarroso opened this issue 14 years ago • 1 comments

I have the following expression:

(define 2-scheme-value? (lambda (v) #t))

With the caret anywhere over scheme-value? (not over 2-), pressing cmd+W selects scheme-value?. Pressing it again selects the whole expression, while it should select only 2-scheme-value?, since that is a valid name for a procedure in Scheme.

rubenbarroso avatar Apr 07 '11 07:04 rubenbarroso

The issue here is that identifiers starting with numbers are not valid according to the R5RS spec (see the <initial> construction in the spec). Despite this, some implementations (including SISC) accept them, and in fact SISC has some invalid identifiers in its standard library (e.g. ->jint and friends). I'm not sure what to do about this.

cmf avatar Apr 07 '11 08:04 cmf