a2df797...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Add mechanism for escaping shorthand substitution
* src/lread.c (read1): Add skip_shorthand variable. Add a '#\'
case. Sometimes call oblookup instead of
oblookup_considering_shorthand.
881478b...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Consider shorthands in Elisp's elisp-completion-at-point
* lisp/progmodes/elisp-mode.el : new helper.
(elisp-completion-at-point): Use new helpers.
(elisp--completion-local-symbols)
(elisp--fboundp-considering-shorthands)
(elisp--bboundp-considering-shorthands): New helpers
62523a0...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Rework elisp-shorthands to only allow only prefix substitution
This simplification in requirements makes for more complex C code but
that code is much less wasteful in Lisp strings than the previous
implementation.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer)
(elisp-shorthand-read-from-string): Use new format of
shorthand-longhand-.
* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test)
(f-test2, f-test3): Use new form of elisp-shorthands.
2f95a95...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Add a test for byte-compilation
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-byte-compile-a-file): New test.
(elisp-shorthand-load-a-file): Simplify.
fe4e4c2...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Integrate shorthand functionality into elisp-mode.el
Also rename the main variable to elisp-shorthands, from the
silly pleonastic shorthand-shorthands.
For some reason, I had to stick the new source-file loading functions
in lisp/international/mule.el, otherwise lisp/loadup.el wouldn't see
them. This should probably be fixed.
* src/lread.c (oblookup_considering_shorthand, syms_of_lread):
Rename variable elisp-shorthand, from shorthand-shorthands.
* test/lisp/shorthand-tests.el: Remove.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer)
(elisp-shorthand-read-from-string)
(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.
82528bc...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Robustify checking of shorthand-shorthands
* src/lread.c (oblookup_considering_shorthand): Maybe warn when we
find fishy shorthand-shorthands.
5811e05...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Move most of the shorthand implementation to C code
This very likely 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, which perhaps has the
potential to be catastrophic in terms of GC.
But it passes the tests.
The solution to this, is probably to simplify the semantics of
shorthand-shorthands. Instead of making it a regexp-to-longhand
alist, make it just prefix-to-longhand. Then we wouldn't need to call
Fstring_match in oblookup_considering_shorthand, meaning we wouldn't
need a Lisp string there.
* lisp/shorthand.el (shorthand-shorthands): Move to C code.
(shorthand--expand-shorthand): Remove.
(shorthand-read-wrapper): Remove.
(shorthand-intern-soft-wrapper): Remove.
(read, intern-soft): No longer advise.
* src/lread.c:
(read1, Fintern, Fintern_soft, Funintern): Use
oblookup_considering_shorthand.
(oblookup_considering_shorthand): New helper.
(syms_of_lread): Declare shorthand-shorthands.