File: CONTRIBUTING.md

package info (click to toggle)
racket-mode 20201227git0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,040 kB
  • sloc: lisp: 9,808; makefile: 55
file content (115 lines) | stat: -rw-r--r-- 3,082 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Reporting bugs

If you're going to report a bug -- thank you!

Please use <kbd>M-x racket-bug-report</kbd> to generate a buffer with
information that will help to reproduce and understand the bug:

- Emacs version
- value of important Racket Mode variables
- minor-modes that are active

Please copy this and paste in your bug report.

# Making pull requests

If you'd like to make a pull request -- thank you!

Here is some information to help you.

## Package dependencies

Racket Mode depends on some other packages. In `racket-mode.el` see
the `Package-Requires:` line.

You can install these manually with <kbd>M-x package-install</kbd>,
or, run `make deps`. The latter is also used by `.travis.yml`.

The recent trend has been for Racket Mode to depend on fewer packages,
not more. For example `dash.el` was dropped in favor of using native
Emacs Lisp constructs. Likewise `s.el`.

Having said that, if your PR truly needs a new package, please make
sure your PR updates all of:

1. the `Package-Requires:` line in `racket-mode.el`
2. the `deps` target in `makefile`

## Pointing Emacs to your Git clone

After ensuring all dependencies of Racket Mode are installed, it
suffices to add the path to your local clone of Racket Mode to
`load-path` and require the package:

```elisp
(add-to-list 'load-path "/path/to/the/git-clone/dir")
(require 'racket-mode)
```

Note that these lines will override any previous references to Racket
Mode in your Emacs configuration.  In particular, if you have Racket
Mode installed as an Emacs package, after evaluating these lines you
will use Racket Mode from your local Git repository.

If you use `use-package`, you can simply replace

```elisp
(use-package racket-mode
    :ensure t)
```

with

```elisp
(use-package racket-mode
    :load-path "/path/to/the/git-clone/dir")
```

You might also need to:

* run <kbd>M-x package-delete</kbd> <kbd>racket-mode</kbd> so that the
  ELPA package is not loaded from `.emacs.d/elpa`,

* restart Emacs.

## doc/generate.el

We generate reference documentation from doc strings for commands, variables, and faces.

- If you add a brand-new command, `defcustom`, or `defface`, please
  also add it to appropriate list in `doc/generate.el`.

- Whenever you edit a doc string for a command, `defcustom`, or
  `defface`, please `cd doc && make clean && make` and commit the
  updated files.

## Tests

Currently tests are on the light side. More are welcome.

Please do run `make test` to ensure your changes pass the existing
tests. Travis CI will also do this automatically on your pull request.

### Indentation

Indentation is tested by comparing to a couple reference files,
`example/*.rkt`.

If you change indentation intentionally, you may need to refresh each
reference file:

1. Open it.
2. Reindent it all
    1. <kbd>C-x h</kbd>
    2. <kbd>M-C-\\</kbd>
3. Save it.

### Font-lock

Font-lock is tested by comparing to a couple reference files,
`example/*.rkt.faceup`.

If you change font-lock, you may need to refresh each reference file:

1. Open it.
2. <kbd>M-x faceup-write-file</kbd>