Commit 2007e53
committed
Improve documentation for backtracking indentation
The backtracking indent mechanism was poorly documented — the README
showed incorrect specs and didn't explain how positional indexing
works, and the docstrings were minimal.
README changes:
- Replace the vague "more sophisticated indent specifications"
section with a detailed explanation of how backtracking works,
including a table of spec elements and annotated examples for
letfn and defrecord
- Update the built-in specs to match the actual code
- Rewrite the performance section with specifics about which forms
break when backtracking is disabled
Docstring changes:
- clojure-use-backtracking-indent: explain what it does and what
breaks when disabled
- clojure-max-backtracking: clarify relationship to backtracking
- clojure--find-indent-spec-backtracking: document the algorithm
and positional indexing with an example
- clojure-indent-function: document list specs and the def*/with-*
fallback behavior
- put-clojure-indent: document all allowed INDENT values with examples1 parent 3052427 commit 2007e53
2 files changed
Lines changed: 114 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
246 | 285 | | |
247 | 286 | | |
248 | 287 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
257 | 299 | | |
258 | 300 | | |
259 | 301 | | |
260 | | - | |
| 302 | + | |
261 | 303 | | |
262 | 304 | | |
263 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
264 | 311 | | |
265 | 312 | | |
266 | 313 | | |
| |||
724 | 771 | | |
725 | 772 | | |
726 | 773 | | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
731 | 782 | | |
732 | | - | |
733 | | - | |
| 783 | + | |
734 | 784 | | |
735 | 785 | | |
736 | 786 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
205 | | - | |
| 211 | + | |
| 212 | + | |
206 | 213 | | |
207 | 214 | | |
208 | 215 | | |
| |||
1694 | 1701 | | |
1695 | 1702 | | |
1696 | 1703 | | |
1697 | | - | |
1698 | | - | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
1699 | 1713 | | |
1700 | 1714 | | |
1701 | 1715 | | |
| |||
1836 | 1850 | | |
1837 | 1851 | | |
1838 | 1852 | | |
1839 | | - | |
| 1853 | + | |
1840 | 1854 | | |
1841 | | - | |
1842 | | - | |
| 1855 | + | |
| 1856 | + | |
1843 | 1857 | | |
1844 | 1858 | | |
1845 | | - | |
1846 | | - | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
1847 | 1870 | | |
1848 | 1871 | | |
1849 | 1872 | | |
| |||
1904 | 1927 | | |
1905 | 1928 | | |
1906 | 1929 | | |
1907 | | - | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
1908 | 1943 | | |
1909 | 1944 | | |
1910 | 1945 | | |
| |||
0 commit comments