load-file: accept empty file or final comment, return nil
authorNicolas Boulenguez <nicolas.boulenguez@free.fr>
Mon, 15 Jul 2019 21:57:02 +0000 (23:57 +0200)
committerNicolas Boulenguez <nicolas.boulenguez@free.fr>
Sun, 28 Jul 2019 11:08:05 +0000 (13:08 +0200)
commite6d41de4d5e6259a23874658ba3af1503739f572
treef9fcb931a61b2db9d414dfd73f01f66a41b3049e
parent402fb331d6929c176fbeb05be07b63347c527249
load-file: accept empty file or final comment, return nil

Let `load-file` append a new line in case last line contains a
comment.

Also append `nil` so that the return value is predictible. Remove the
existing explicit `nil` from existing sources.

Adapt documentation and tests.
418 files changed:
ada.2/step6_file.adb
ada.2/step7_quote.adb
ada.2/step8_macros.adb
ada.2/step9_try.adb
ada.2/stepa_mal.adb
ada/step6_file.adb
ada/step7_quote.adb
ada/step8_macros.adb
ada/step9_try.adb
ada/stepa_mal.adb
awk/step6_file.awk
awk/step7_quote.awk
awk/step8_macros.awk
awk/step9_try.awk
awk/stepA_mal.awk
bash/step6_file.sh
bash/step7_quote.sh
bash/step8_macros.sh
bash/step9_try.sh
bash/stepA_mal.sh
basic/step6_file.in.bas
basic/step7_quote.in.bas
basic/step8_macros.in.bas
basic/step9_try.in.bas
basic/stepA_mal.in.bas
bbc-basic/step6_file.bbc
bbc-basic/step7_quote.bbc
bbc-basic/step8_macros.bbc
bbc-basic/step9_try.bbc
bbc-basic/stepA_mal.bbc
c/step6_file.c
c/step7_quote.c
c/step8_macros.c
c/step9_try.c
c/stepA_mal.c
chuck/step6_file.ck
chuck/step7_quote.ck
chuck/step8_macros.ck
chuck/step9_try.ck
chuck/stepA_mal.ck
clojure/src/mal/step6_file.cljc
clojure/src/mal/step7_quote.cljc
clojure/src/mal/step8_macros.cljc
clojure/src/mal/step9_try.cljc
clojure/src/mal/stepA_mal.cljc
coffee/step6_file.coffee
coffee/step7_quote.coffee
coffee/step8_macros.coffee
coffee/step9_try.coffee
coffee/stepA_mal.coffee
common-lisp/src/step6_file.lisp
common-lisp/src/step7_quote.lisp
common-lisp/src/step8_macros.lisp
common-lisp/src/step9_try.lisp
common-lisp/src/stepA_mal.lisp
cpp/step6_file.cpp
cpp/step7_quote.cpp
cpp/step8_macros.cpp
cpp/step9_try.cpp
cpp/stepA_mal.cpp
crystal/step6_file.cr
crystal/step7_quote.cr
crystal/step8_macros.cr
crystal/step9_try.cr
crystal/stepA_mal.cr
cs/step6_file.cs
cs/step7_quote.cs
cs/step8_macros.cs
cs/step9_try.cs
cs/stepA_mal.cs
d/step6_file.d
d/step7_quote.d
d/step8_macros.d
d/step9_try.d
d/stepA_mal.d
dart/step6_file.dart
dart/step7_quote.dart
dart/step8_macros.dart
dart/step9_try.dart
dart/stepA_mal.dart
elisp/step6_file.el
elisp/step7_quote.el
elisp/step8_macros.el
elisp/step9_try.el
elisp/stepA_mal.el
elixir/lib/mix/tasks/step6_file.ex
elixir/lib/mix/tasks/step7_quote.ex
elixir/lib/mix/tasks/step8_macros.ex
elixir/lib/mix/tasks/step9_try.ex
elixir/lib/mix/tasks/stepA_mal.ex
elm/step6_file.elm
elm/step7_quote.elm
elm/step8_macros.elm
elm/step9_try.elm
elm/stepA_mal.elm
erlang/src/step6_file.erl
erlang/src/step7_quote.erl
erlang/src/step8_macros.erl
erlang/src/step9_try.erl
erlang/src/stepA_mal.erl
es6/step6_file.mjs
es6/step7_quote.mjs
es6/step8_macros.mjs
es6/step9_try.mjs
es6/stepA_mal.mjs
examples/clojurewest2014.mal
examples/exercises.mal
examples/presentation.mal
factor/step6_file/step6_file.factor
factor/step7_quote/step7_quote.factor
factor/step8_macros/step8_macros.factor
factor/step9_try/step9_try.factor
factor/stepA_mal/stepA_mal.factor
fantom/src/step6_file/fan/main.fan
fantom/src/step7_quote/fan/main.fan
fantom/src/step8_macros/fan/main.fan
fantom/src/step9_try/fan/main.fan
fantom/src/stepA_mal/fan/main.fan
forth/step6_file.fs
forth/step7_quote.fs
forth/step8_macros.fs
forth/step9_try.fs
forth/stepA_mal.fs
fsharp/step6_file.fs
fsharp/step7_quote.fs
fsharp/step8_macros.fs
fsharp/step9_try.fs
fsharp/stepA_mal.fs
gnu-smalltalk/step6_file.st
gnu-smalltalk/step7_quote.st
gnu-smalltalk/step8_macros.st
gnu-smalltalk/step9_try.st
gnu-smalltalk/stepA_mal.st
go/src/step6_file/step6_file.go
go/src/step7_quote/step7_quote.go
go/src/step8_macros/step8_macros.go
go/src/step9_try/step9_try.go
go/src/stepA_mal/stepA_mal.go
groovy/step6_file.groovy
groovy/step7_quote.groovy
groovy/step8_macros.groovy
groovy/step9_try.groovy
groovy/stepA_mal.groovy
guile/step6_file.scm
guile/step7_quote.scm
guile/step8_macros.scm
guile/step9_try.scm
guile/stepA_mal.scm
haskell/step6_file.hs
haskell/step7_quote.hs
haskell/step8_macros.hs
haskell/step9_try.hs
haskell/stepA_mal.hs
haxe/Step6_file.hx
haxe/Step7_quote.hx
haxe/Step8_macros.hx
haxe/Step9_try.hx
haxe/StepA_mal.hx
hy/step6_file.hy
hy/step7_quote.hy
hy/step8_macros.hy
hy/step9_try.hy
hy/stepA_mal.hy
io/step6_file.io
io/step7_quote.io
io/step8_macros.io
io/step9_try.io
io/stepA_mal.io
java/src/main/java/mal/step6_file.java
java/src/main/java/mal/step7_quote.java
java/src/main/java/mal/step8_macros.java
java/src/main/java/mal/step9_try.java
java/src/main/java/mal/stepA_mal.java
js/step6_file.js
js/step7_quote.js
js/step8_macros.js
js/step9_try.js
js/stepA_mal.js
julia/step6_file.jl
julia/step7_quote.jl
julia/step8_macros.jl
julia/step9_try.jl
julia/stepA_mal.jl
kotlin/src/mal/step6_file.kt
kotlin/src/mal/step7_quote.kt
kotlin/src/mal/step8_macros.kt
kotlin/src/mal/step9_try.kt
kotlin/src/mal/stepA_mal.kt
lib/README.md
lib/alias-hacks.mal
lib/equality.mal
lib/load-file-once.mal
lib/memoize.mal
lib/perf.mal
lib/pprint.mal
lib/protocols.mal
lib/reducers.mal
lib/test_cascade.mal
lib/threading.mal
lib/trivial.mal
livescript/step6_file.ls
livescript/step7_quote.ls
livescript/step8_macros.ls
livescript/step9_try.ls
livescript/stepA_mal.ls
logo/step6_file.lg
logo/step7_quote.lg
logo/step8_macros.lg
logo/step9_try.lg
logo/stepA_mal.lg
lua/step6_file.lua
lua/step7_quote.lua
lua/step8_macros.lua
lua/step9_try.lua
lua/stepA_mal.lua
make/step6_file.mk
make/step7_quote.mk
make/step8_macros.mk
make/step9_try.mk
make/stepA_mal.mk
mal/step6_file.mal
mal/step7_quote.mal
mal/step8_macros.mal
mal/step9_try.mal
mal/stepA_mal.mal
matlab/step6_file.m
matlab/step7_quote.m
matlab/step8_macros.m
matlab/step9_try.m
matlab/stepA_mal.m
miniMAL/step6_file.json
miniMAL/step7_quote.json
miniMAL/step8_macros.json
miniMAL/step9_try.json
miniMAL/stepA_mal.json
nasm/step6_file.asm
nasm/step7_quote.asm
nasm/step8_macros.asm
nasm/step9_try.asm
nasm/stepA_mal.asm
nim/step6_file.nim
nim/step7_quote.nim
nim/step8_macros.nim
nim/step9_try.nim
nim/stepA_mal.nim
objc/step6_file.m
objc/step7_quote.m
objc/step8_macros.m
objc/step9_try.m
objc/stepA_mal.m
objpascal/step6_file.pas
objpascal/step7_quote.pas
objpascal/step8_macros.pas
objpascal/step9_try.pas
objpascal/stepA_mal.pas
ocaml/step6_file.ml
ocaml/step7_quote.ml
ocaml/step8_macros.ml
ocaml/step9_try.ml
ocaml/stepA_mal.ml
perl/step6_file.pl
perl/step7_quote.pl
perl/step8_macros.pl
perl/step9_try.pl
perl/stepA_mal.pl
perl6/step6_file.pl
perl6/step7_quote.pl
perl6/step8_macros.pl
perl6/step9_try.pl
perl6/stepA_mal.pl
php/step6_file.php
php/step7_quote.php
php/step8_macros.php
php/step9_try.php
php/stepA_mal.php
picolisp/step6_file.l
picolisp/step7_quote.l
picolisp/step8_macros.l
picolisp/step9_try.l
picolisp/stepA_mal.l
plpgsql/step6_file.sql
plpgsql/step7_quote.sql
plpgsql/step8_macros.sql
plpgsql/step9_try.sql
plpgsql/stepA_mal.sql
plsql/step6_file.sql
plsql/step7_quote.sql
plsql/step8_macros.sql
plsql/step9_try.sql
plsql/stepA_mal.sql
powershell/step6_file.ps1
powershell/step7_quote.ps1
powershell/step8_macros.ps1
powershell/step9_try.ps1
powershell/stepA_mal.ps1
process/guide.md
process/step6_file.txt
process/step7_quote.txt
process/step8_macros.txt
process/step9_try.txt
process/stepA_mal.txt
ps/step6_file.ps
ps/step7_quote.ps
ps/step8_macros.ps
ps/step9_try.ps
ps/stepA_mal.ps
python/step6_file.py
python/step7_quote.py
python/step8_macros.py
python/step9_try.py
python/stepA_mal.py
r/step6_file.r
r/step7_quote.r
r/step8_macros.r
r/step9_try.r
r/stepA_mal.r
racket/step6_file.rkt
racket/step7_quote.rkt
racket/step8_macros.rkt
racket/step9_try.rkt
racket/stepA_mal.rkt
rexx/step6_file.rexx
rexx/step7_quote.rexx
rexx/step8_macros.rexx
rexx/step9_try.rexx
rexx/stepA_mal.rexx
rpython/step6_file.py
rpython/step7_quote.py
rpython/step8_macros.py
rpython/step9_try.py
rpython/stepA_mal.py
ruby/step6_file.rb
ruby/step7_quote.rb
ruby/step8_macros.rb
ruby/step9_try.rb
ruby/stepA_mal.rb
rust/step6_file.rs
rust/step7_quote.rs
rust/step8_macros.rs
rust/step9_try.rs
rust/stepA_mal.rs
scala/step6_file.scala
scala/step7_quote.scala
scala/step8_macros.scala
scala/step9_try.scala
scala/stepA_mal.scala
scheme/step6_file.scm
scheme/step7_quote.scm
scheme/step8_macros.scm
scheme/step9_try.scm
scheme/stepA_mal.scm
skew/step6_file.sk
skew/step7_quote.sk
skew/step8_macros.sk
skew/step9_try.sk
skew/stepA_mal.sk
swift/step6_file.swift
swift/step7_quote.swift
swift/step8_macros.swift
swift/step9_try.swift
swift/stepA_mal.swift
swift3/Sources/step6_file/main.swift
swift3/Sources/step7_quote/main.swift
swift3/Sources/step8_macros/main.swift
swift3/Sources/step9_try/main.swift
swift3/Sources/stepA_mal/main.swift
swift4/Sources/step6_file/main.swift
swift4/Sources/step7_quote/main.swift
swift4/Sources/step8_macros/main.swift
swift4/Sources/step9_try/main.swift
swift4/Sources/stepA_mal/main.swift
tcl/step6_file.tcl
tcl/step7_quote.tcl
tcl/step8_macros.tcl
tcl/step9_try.tcl
tcl/stepA_mal.tcl
tests/computations.mal
tests/incB.mal
tests/incC.mal
tests/lib/load-file-once.mal
tests/step6_file.mal
tests/step7_quote.mal
tests/stepA_mal.mal
ts/step6_file.ts
ts/step7_quote.ts
ts/step8_macros.ts
ts/step9_try.ts
ts/stepA_mal.ts
vala/step6_file.vala
vala/step7_quote.vala
vala/step8_macros.vala
vala/step9_try.vala
vala/stepA_mal.vala
vb/step6_file.vb
vb/step7_quote.vb
vb/step8_macros.vb
vb/step9_try.vb
vb/stepA_mal.vb
vhdl/step6_file.vhdl
vhdl/step7_quote.vhdl
vhdl/step8_macros.vhdl
vhdl/step9_try.vhdl
vhdl/stepA_mal.vhdl
vimscript/step6_file.vim
vimscript/step7_quote.vim
vimscript/step8_macros.vim
vimscript/step9_try.vim
vimscript/stepA_mal.vim
wasm/step6_file.wam
wasm/step7_quote.wam
wasm/step8_macros.wam
wasm/step9_try.wam
wasm/stepA_mal.wam
yorick/step6_file.i
yorick/step7_quote.i
yorick/step8_macros.i
yorick/step9_try.i
yorick/stepA_mal.i