emacs-eldev / eldev

Elisp development tool
https://emacs-eldev.github.io/eldev/
GNU General Public License v3.0
226 stars 17 forks source link

Fix Emacs 26 bootstrap quoting issue with trailing newline #73

Closed ikappaki closed 2 years ago

ikappaki commented 2 years ago

Fixes Emacs 26 issue with the command line --execute "..." option that does not allow newline characters at the end of the quoted command (#72).

Currently Eldev always appends a newline when eldev-bat-quoteing the bootstrap code (where it shouldn't add anything more to it). The patch remove this extraneous newline character. It also ensures that it removes any newlines from the bootstrap code in eldev.bat.in by trimming the bootstrap contents.

Finally, there is a unexplained bizarreness with the .bat file reader that it will not allow the second --execute to be on its own line if " is not the first line character in our case, and thus all command line options after the first --execute have been merged into one line.

I have not included a test since this will require running Emacs 26 Windows in GitHub CI, which would be too much to ask for. I would say older Emacs versions on Windows are on a best effort support, and if it silently breaks, so be it until someone complains.

Thanks

doublep commented 2 years ago

Please just squash the commits and I will merge this.

ikappaki commented 2 years ago

Please just squash the commits and I will merge this.

Done, thanks.

doublep commented 2 years ago

Thank you.