I'm not sure if this is a bug as such, but I can't find any changes to the Elisp Manual (for 26.1) to explain the behaviour.
I have a long-standing Emacs extension that, to save load time, saves Lisp Objects in a file and then reads them at Emacs start-up (if the file is available). This works up to Emacs 25.3, but fails on the Read process, in Emacs 26.1, with an error message in *Messages* buffer of:
setq: Invalid read syntax: "#"
I have looked at the Lisp Object files produced under 25.3.1 and 26.1 and they look completely different. The "same" Lisp objects file written by 26.1 is approximately 15 times the size of the Lisp objects written by 25.3.1.
I use a "print" command to write the information to file and a "read" command to read back as a Lisp Object. The objects written are Lisp class instances created from the eieio class package library.
I have attached the two files containing the produced Lisp Objects - as stated, the larger file is produced using 26.1, the smaller file contains the same Lisp Objects produced by 25.3.1. With 26.1, the "read" operation fails at line 16 (the first eieio class object instance).
Any help on this would be appreciated. My initial thought is to just trap the error and bypass reading the Lisp Objects from file and take them from the original text source instead - but that is a slower process, but would allow my extension to work with both Emacs versions.
P.S. If you want to look at the code that reads and writes these Lisp Objects, it is on GitHub at:
The defuns to write/read the Lisp Objects are dump-language-to-file (line 96) and restore-language-from-file (line 119) respectively.