* test/lisp/mh-e/mh-utils-tests.el (with-mh-test-env): Refactor to
reduce the size of the expanded macro.
(mh-test-utils-setup): New helper function.
(mh-ensure-native-trampolines): Absorbed by mh-test-utils-setup.
* doc/lispref/compile.texi (Native Compilation): Document
native-comp-available-p as the way to test for native compilation.
* lisp/emacs-lisp/package.el (package--native-compile-async):
* test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines):
Test for native compilation with native-comp-available-p.
Thank you to Andrea Corallo for reviewing this patch.
* test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines):
New function.
(mh-test-utils-setup-with-mocks)
(mh-test-utils-setup-with-variant): Use it.
* doc/misc/tramp.texi (FUSE setup): Add tramp-fuse-unmount-on-cleanup.
* lisp/net/tramp.el (tramp-file-name-unify): New defun.
(tramp-file-name-equal-p):
* lisp/net/tramp-cache.el (tramp-get-connection-property)
(tramp-set-connection-property, tramp-flush-connection-property)
(tramp-flush-connection-properties): Use it.
* lisp/net/tramp-fuse.el (tramp-fuse-get-fusermount): New defun.
(tramp-fuse-mount-points): New defvar.
(tramp-fuse-unmount): Use it. Delete VEC from
`tramp-fuse-mount-points'. Delete mount point.
(tramp-fuse-unmount-on-cleanup): New user option.
(tramp-fuse-cleanup, tramp-fuse-cleanup-all): New defuns.
(top): Adapt `tramp-fuse-unload-hook',
`tramp-cleanup-connection-hook',
`tramp-cleanup-all-connections-hook' and `kill-emacs-hook'.
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
Add VEC to `tramp-fuse-mount-points'.
* test/lisp/net/tramp-tests.el (tramp-fuse-unmount-on-cleanup): Declare.
(tramp-test39-make-lock-file-name): Use it.
The new name fits better in the family of variables that affect
the Lisp reader.
Suggested-by: Po Lu <luangruo@yahoo.com>
* doc/lispref/symbols.texi (Shorthands): Mention read-symbol-shorthands
* lisp/shorthands.el (hack-read-symbol-shorthands)
(hack-read-symbol-shorthands)
(shorthands-font-lock-shorthands): Use read-symbol-shorthands
* lisp/progmodes/elisp-mode.el (elisp--completion-local-symbols)
(elisp--completion-local-symbols)
(elisp-shorthands): Use read-symbol-shorthands
* src/lread.c:
(syms_of_lread): Define Vread_symbol_shorthands
(oblookup_considering_shorthand): Use Vread_symbol_shorthands.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer):
(elisp-shorthand-read-from-string): Use read-symbol-shorthands
* test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
Use new symbol name read-symbol-shorthands.
Only the shorthanded prefix is font-locked. This allows the remainder
of the font-lock logic to subsist (e.g. for macro-defining symbols).
* lisp/shorthands.el (cl-lib): Require it when compiling.
(elisp-shorthand-font-lock-face): New face.
(shorthands--mismatch-from-end): New helper.
(shorthands-font-lock-shorthands): New helper.
* test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el:
Add some dummy test code.
* test/lisp/subr-tests.el (subr-test-internal--format-docstring-line):
* lisp/subr.el (internal--format-docstring-line): Make it more clear
that this function is not intended for the first line of a docstring.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add comment explaining
why we use 'internal--format-docstring-line'.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
To improve performance and flexibility (bug#50777).
* lisp/progmodes/xref.el (xref-location): Remove.
(xref-file-location): Change to cl-struct.
(xref-buffer-location, xref-bogus-location): Ditto.
(xref-item, xref-match-item): Same.
And update all method definitions accordingly.
(xref--insert-xrefs): Don't use 'oref', use 'xref-item-location'.
(xref--insert-xrefs, xref-show-definitions-completing-read):
Insetad of 'with-slots', use 'xref-item-summary' and
'xref-item-location'.
* lisp/progmodes/etags.el (xref-etags-location):
Change from EIEIO class into a cl-struct.
(xref-etags-apropos-location): Ditto.
Update all method definitions.
* test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-test-run):
Avoid using 'oref'.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix bug where a paragraph
was filled as if it were a single line, which led to garbled
output in the docstring. (Bug#50839)
* test/lisp/subr-tests.el
(subr-test-internal--format-docstring-line): New test.
* test/infra/Dockerfile.emba (emacs-base): Install also
libdbus-1-dev and libacl1-dev.
* test/infra/gitlab-ci.yml (prep-image-base): Comment out. This
stage is activated by default in Dockerfile.emba.
The test signing key succumbed to either expiration or bitrot.
I hope I didn't just publish my secret key to the world.
* test/lisp/emacs-lisp/package-resources/key.pub: Refresh.
* test/lisp/emacs-lisp/package-resources/key.sec: Refresh.
Instead of referencing obarray directly, that function has to consider
a collection of completions which includes the shorthand versions of
some of the symbols. That collection changes from buffer to buffer,
depending on the choice of elisp-shorthands.
To make this process efficient, and avoid needless recalculation of
the above collection, a new obarray-specific cache was invented. The
Elisp variable obarray-cache is immediately nullified if something
touches the obarray.
* 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
* src/lread.c (intern_driver): Nullify Qobarray_cache.
(syms_of_lread): Add Qobarray_cache.
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-completion-at-point): New test.
* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el
(f-test-complete-me): New fixture.
This simplification in requirements makes for more complex C code but
that code is much less wasteful in Lisp strings than the previous
implementation.
* src/lread.c (read1): Rework.
(Fintern): Rework.
(Fintern_soft): Rework.
(Funintern): Rework.
(oblookup_considering_shorthand): Rewrite.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer)
(elisp-shorthand-read-from-string): Use new format of
elisp-shorthands.
* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test)
(f-test2, f-test3): Use new form of elisp-shorthands.
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.
* lisp/emacs-lisp/bytecomp.el
(byte-compile-docstring-length-warn): Warn about overly long
docstring in lambda. (Bug#44858)
(byte-compile--wide-docstring-p): Improve comment.
* test/lisp/emacs-lisp/bytecomp-tests.el
("warn-wide-docstring-defun.el"): Update to test for the above new
warning.
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Ignore more function argument lists.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests-byte-compile--wide-docstring-p): New test.
This should really be taken care of by a syntax normalisation step in
the frontend, but there is no such step for non-lexbind code yet.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Tolerate bindingsa
without initialising expressions.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
Previously, variables bound outside `while` loops were not substituted
inside even in the absense of mutation. Add the necessary mutation
checking inside loops to allow propagation of values and aliased
variables.
* lisp/emacs-lisp/byte-opt.el
(byte-optimize--inhibit-outside-loop-constprop): New variable.
(byte-optimize-form-code-walker): First traverse each loop without
substitution to discover mutation, then without restrictions.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-loop): New.
(bytecomp-tests--test-cases): Add test cases.
* lisp/emacs-lisp/ert.el (ert-deftest):
Evaluate the body of `ert-deftest` with the `lexical-binding` value of
the source file (or more precisely the value in force when the
definition is evaluated), which is what everyone expected, instead of
always using dynamic binding which is what they got until now.
* test/lisp/emacs-lisp/ert-tests.el
(ert-test-deftest-lexical-binding-t): New test.
Allowing &rest without a variable name following turned out not to be
very useful, and it never worked properly. Disallow it.
* lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list):
* src/eval.c (funcall_lambda):
Signal error for &rest without variable name.
* doc/lispref/functions.texi (Argument List): Adjust manual.
* etc/NEWS (file): Announce.
* test/src/eval-tests.el (eval-tests--bugs-24912-and-24913):
Extend test, also checking with and without lexical binding.
(eval-tests-accept-empty-optional-rest): Reduce to...
(eval-tests-accept-empty-optional): ...this, again checking
with and without lexical binding.