24 drracket:module-language

▼ |  | Dr Racket Plugins

1 | Dr Racket support for #lang-based Languages
2 | Implementing Dr Racket Plugins
3 | Adding Languages to Dr Racket
4 | Creating New Kinds of Dr Racket Frames
5 | Extending the Existing Dr Racket Classes
6 | Expanding the User’s Program Text and Breaking
7 | Editor Modes
8 | Plugin Capabilities
9 | Check Syntax
10 | Cooperating with Background Check Syntax
11 | Teaching Languages
12 | Signatures
13 | drracket: get/ extend
14 | drracket: unit
15 | drracket: language
16 | drracket: language-configuration
17 | drracket: debug
18 | drracket: rep
19 | drracket: frame
20 | drracket: help-desk
21 | drracket: eval
22 | drracket: modes
23 | drracket: module-language-tools
24 | drracket: module-language
25 | drracket: tracing
26 | Backwards Compatibility
| Index

On this page:

drracket: module-language: module-language<%>
get-users-language-name
drracket: module-language-tools: definitions-text<%>
move-to-new-language
get-in-module-language?
drracket: module-language-tools: tab<%>
drracket: module-language-tools: frame<%>
drracket: module-language-tools: definitions-text-mixin
drracket: module-language-tools: frame-mixin
drracket: module-language-tools: tab-mixin
drracket: module-language: add-module-language
drracket: module-language: module-language-put-file-mixin

top ← prev up next →

### 24`` drracket:module-language

interface drracket:module-language:module-language<%> : interface?

The only language that implements this interface is DrRacket’s “Use the language declared in the source” language.

> > method (send a-drracket:module-language:module-language get-users-language-name)
> > → string

> Returns the name of the language that is declared in the source, as a string.

interface drracket:module-language-tools:definitions-text<%> : interface?

> > method (send a-drracket:module-language-tools:definitions-text move-to-new-language)
> > → void?

> This method is called when a new language is evident in the definitions window (by editing the #lang line.

> > method (send a-drracket:module-language-tools:definitions-text get-in-module-language?)
> > → boolean?

> Returns #t when the current language setting (from the language dialog) is “The Racket Language”.

interface drracket:module-language-tools:tab<%> : interface?

This interface signals an implementation of a tab that specially handles programs beginning with #lang.

interface drracket:module-language-tools:frame<%> : interface?

This interface signals an implementation of a frame that specially handles programs beginning with #lang.

mixin drracket:module-language-tools:definitions-text-mixin : (class? . -> . class?)
argument extends/implements: | text:basic<%>
| racket:text<%>
| drracket:unit:definitions-text<%>
result implements: | drracket:module-language-tools:definitions-text<%>

mixin drracket:module-language-tools:frame-mixin : (class? . -> . class?)
argument extends/implements: | drracket:unit:frame<%>
result implements: | drracket:module-language-tools:frame<%>

mixin drracket:module-language-tools:tab-mixin : (class? . -> . class?)
argument extends/implements: | drracket:unit:tab<%>
result implements: | drracket:module-language-tools:tab<%>

> procedure (drracket:module-language:add-module-language) → any

Adds the module language to DrRacket. This is called during DrRacket’s startup.

> procedure (drracket:module-language:module-language-put-file-mixin super%)
> → (implementation?/c text:basic<%>)
> super% : (implementation?/c text:basic<%>)

Extends super% by overriding the put-file method to use a default name from the buffer, if the buffer contains something like (module name ...).
top ← prev up next →