diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-10 20:14:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-10 20:14:21 -0700 |
commit | 071c281c7f2652726ba123a917903c77f2144fa0 (patch) | |
tree | 16a17d7561823c48d9d96e1d4b5f2fb3e6b0592c /hash.c | |
parent | 6c331fcee3336398d5f3dd12e6850d26876bc712 (diff) | |
download | txr-071c281c7f2652726ba123a917903c77f2144fa0.tar.gz txr-071c281c7f2652726ba123a917903c77f2144fa0.tar.bz2 txr-071c281c7f2652726ba123a917903c77f2144fa0.zip |
regression: unsuffixed cmdline arg treated as Lisp.
This broke in TXR 216. TXR files with no suffix run
using #!/path/to/txr stopped working due to being interpreted
as Lisp. The rearrangement done in open_txr_file function
didn't respect the hacky treatment of the *txr_lisp_p flag,
which depended on the original order. The flag ends up being
set to t, because we tried (unsuccessfully) opening a .tl
suffix, and that then falsely indicates "Lisp" when the
unsuffixed file is open. That logic worked when we tried the
unsuffixed file first, and fell back on the added suffixes
last.
* parser.c (open-txr_file): Instead of repeatedly testing
for in == 0, we execute a forward goto when we successfully
open a file. Only in those successful cases, set *txr_lisp_p
to the appropriate value, not touching it otherwise.
Diffstat (limited to 'hash.c')
0 files changed, 0 insertions, 0 deletions