Commit c2920f4
committed
Update lispwords
Besides expanding the definitions into an easily maintainable style, we
update the set of words for Clojure 1.5 using a simple rule:
A function should only be indented specially if its first argument
is special.
This generally includes:
* Definitions
* Binding forms
* Constructs that branch from a predicate
What it does not include are functions/macros that accept a flat list of
arguments (arglist: [& body]). Omissions include:
clojure.core/dosync [& exprs]
clojure.core/future [& body]
clojure.core/gen-class [& options]
clojure.core/gen-interface [& options]
clojure.core/with-out-str [& body]
Also added some symbols from clojure.test, since this namespace is
present in many projects.
Interestingly, clojure-mode.el includes "assoc" and "struct-map" in the
special indent list, which makes a good deal of sense:
(assoc my-map
:foo "foo"
:bar "bar")
If we were to include this in lispwords, the following functions/macros
should also be considered since they also take optional key value pairs
at the end of the arglist:
clojure.core/agent [state & options]
clojure.core/assoc … [map key val & kvs]
clojure.core/assoc! … [coll key val & kvs]
clojure.core/atom … [x & options]
clojure.core/ref [x] [x & options]
clojure.core/refer [ns-sym & filters]
clojure.core/restart-agent [a new-state & options]
clojure.core/slurp [f & opts]
clojure.core/sorted-map-by [comparator & keyvals]
clojure.core/spit [f content & options]
clojure.core/struct-map [s & inits]1 parent 24110ac commit c2920f4
1 file changed
Lines changed: 80 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
330 | 375 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
337 | 398 | | |
338 | 399 | | |
339 | 400 | | |
| |||
0 commit comments