Move most of the shorthand implementation to C code
It passes the tests designed for the previous Elisp implementation.
Likely, this isn't the final form of the implementation. For one, the
reader is much slower and allocates a Lisp string for every atom read,
regardless if its already interned or not. This has the potential to
be catastrophic in terms of GC.
Also rename the main variable to elisp-shorthands, from the
repetitive shorthand-shorthands.
For some reason, I had to put 'hack-elisp-shorthands' and
'load-with-shorthands-and-code-conversion', the new source-file
loading functions, in lisp/international/mule.el.
Otherwise, lisp/loadup.el wouldn't see them, for some reason that I
didn't investigate. This should probably be fixed.
* lisp/shorthand.el: Remove.
* test/lisp/shorthand-tests.el: Remove.
* src/lread.c:
(read1, Fintern, Fintern_soft, Funintern): Use
oblookup_considering_shorthand.
(oblookup_considering_shorthand): New helper.
(syms_of_lread): Declare elisp-shorthands.
* lisp/progmodes/elisp-mode.el (elisp-shorthands):
Put a safe-local-variable spec.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer)
(elisp-shorthand-read-from-string)
(elisp-shorthand-byte-compile-a-file)
(elisp-shorthand-load-a-file): New tests.
* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el: New file
* lisp/loadup.el (load-source-file-function): Set to
load-with-shorthands-and-code-conversion.
* lisp/international/mule.el (hack-elisp-shorthands): Move here.
(load-with-shorthands-and-code-conversion): And here.