Commit graph

8835 commits

Author SHA1 Message Date
Stefan Kangas
93036209fa ; Fix typos (duplicate words) 2022-11-17 09:34:24 +01:00
Eli Zaretskii
43cca14a9e ; * lisp/emacs-lisp/seq.el (seq-filter): Fix typo in doc string. 2022-11-17 08:48:14 +02:00
Eli Zaretskii
3b137bcbe8 ; Improve doc strings in seq.el
* lisp/emacs-lisp/seq.el (seq-doseq, seq-setq, seq-elt)
(seq-length, seq-rest, seq-do, seq-mapn, seq-drop, seq-take)
(seq-drop-while, seq-take-while, seq-sort, seq-sort-by)
(seq-concatenate, seq-into, seq-filter, seq-remove)
(seq-remove-at-position, seq-every-p, seq-some, seq-find)
(seq-count, seq-contains, seq-contains-p, seq-set-equal-p)
(seq-position, seq-positions, seq-uniq, seq-mapcat)
(seq-partition, seq-union, seq-intersection, seq-difference)
(seq--count-successive, seq--elt-safe, seq-random-elt)
(seq-split, seq-keep): Doc fixes.
2022-11-15 19:36:49 +02:00
Stefan Kangas
6f48b46b03 ; Fix typos 2022-11-11 15:52:37 +01:00
Gerd Möllmann
6d9065b748 Fix &key parameters called without arguments (bug#58714)
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
2022-11-11 14:13:46 +01:00
Nicholas Vollmer
a01024c859 bytecomp.el (byte-recompile-directory): Fix negated ignore logic
Previous logic would only compile files which matched the
byte-compile-ignore-files regular expression.  (Bug#59115)
2022-11-09 09:50:38 +01:00
Mattias Engdegård
e46f680489 ; * lisp/emacs-lisp/package.el (package-load-all-descriptors): Use \` 2022-11-06 16:01:13 +01:00
Philip Kaludercic
270020a4b4 Rephrase 'package-vc-ensure-packages' docstring
* lisp/emacs-lisp/package-vc.el (package-vc-ensure-packages): Make it
easier to read.
2022-11-05 17:44:57 +01:00
Philip Kaludercic
1557bb9d8f ; Rename 'package-vc-link-directory' to '-install-from-checkout'
* doc/emacs/package.texi (Fetching Package Sources): Rename instances
* etc/NEWS: Rename instances.
* lisp/emacs-lisp/package-vc.el (package-vc-link-directory): Rename to
'package-vc-install-from-checkout'.
2022-11-05 17:44:54 +01:00
Eli Zaretskii
22fb5397de ; Fix documentation of package-vc.el
* lisp/emacs-lisp/package-vc.el (package-vc-default-backend)
(package-vc-selected-packages, package-vc--archive-spec-alist)
(package-vc--archive-data-alist, package-vc--query-spec)
(package-vc--read-archive-data, package-vc-commit)
(package-vc--main-file, package-vc--generate-description-file)
(package-vc--build-documentation, package-vc--unpack-1)
(package-vc--guess-backend, package-vc--clone)
(package-vc--unpack, package-vc-update, package-vc--release-rev)
(package-vc-install, package-vc-checkout)
(package-vc-link-directory, package-vc-refresh)
(package-vc-prepare-patch, package-vc--archives-initialize): Doc fixes.
2022-11-05 13:11:28 +02:00
Stefan Kangas
5f0af7caec ; package-vc: Pacify byte-compiler
* lisp/emacs-lisp/package-vc.el (package-vc-selected-packages):
Declare.
2022-11-04 20:16:04 +01:00
Philip Kaludercic
5fa2f11679 Merge branch 'feature/package+vc' 2022-11-04 18:57:45 +01:00
Philip Kaludercic
f762c5bb2c * lisp/emacs-lisp/package-vc.el: Expand commentary 2022-11-04 18:54:17 +01:00
Philip Kaludercic
184f0c3e60 ; * lisp/emacs-lisp/package-vc.el (package-vc): Add missing :prefix 2022-11-04 18:19:01 +01:00
Philip Kaludercic
f17fadd01a Link to Manual from the package-vc group
* lisp/emacs-lisp/package-vc.el (package-vc): Add 'custom-manual'
link.
2022-11-04 18:17:45 +01:00
Philip Kaludercic
b5850ba3ae Document 'package-vc-selected-packages'
* doc/emacs/package.texi: Expand documentation and give example.
* etc/NEWS: Mention 'package-vc-selected-packages'.
* lisp/emacs-lisp/package-vc.el (package-vc--select-packages): Remove
function.
(package-vc-ensure-packages): Add function based on
'package-vc--select-packages'.
(package-vc-selected-packages): Call 'package-vc-ensure-packages' from
custom setter.
2022-11-04 18:05:41 +01:00
Juanma Barranquero
4fa8f57cc6 ; * lisp/emacs-lisp/oclosure.el: Fix typos. 2022-11-04 08:41:43 +01:00
Philip Kaludercic
0efc611697 Autoload all entry functions 2022-11-03 23:15:18 +01:00
Philip Kaludercic
38efed50dc ; Mention that 'package-vc-checkout' open a directory
* lisp/emacs-lisp/package-vc.el (package-vc-checkout): Mention it in
the docstring.
2022-11-03 19:41:46 +01:00
Philip Kaludercic
f5fb7069f3 ; Explicitly mark internal functions as such 2022-11-03 19:38:34 +01:00
Philip Kaludercic
0e75099da8 * lisp/emacs-lisp/package-vc.el (package-vc-version): Use main file 2022-11-03 19:28:47 +01:00
Philip Kaludercic
ec01d9a209 Add command 'package-vc-checkout'
* doc/emacs/package.texi: Document feature.
* etc/NEWS: Mention feature.
* lisp/emacs-lisp/package-vc.el (package-vc-clone): Extract
functionality out of 'package-vc-unpack'.
(package-vc-unpack): Extract functionality out to 'package-vc-clone'.
(package-vc-checkout): Add command.
2022-11-03 19:26:21 +01:00
Eli Zaretskii
dffc34a2d4 Fix 'text-property-search-backward' with 1-char long properties
* lisp/emacs-lisp/text-property-search.el
(text-property--find-end-backward): Don't miss the end of
text-property value at point.  This fixes searches backward when
the property is on a single character position.  (Bug#58937)
2022-11-03 11:25:50 +02:00
Philip Kaludercic
7705b66ed3 ; Update TODO section 2022-11-02 17:16:39 +01:00
Philip Kaludercic
57708df032 ; Handle case that was forgotten in the last commit 2022-11-02 13:58:14 +01:00
Philip Kaludercic
b5dfd1dfe1 Track file name in 'package--downloads-in-progress'
* lisp/emacs-lisp/package.el (package--download-one-archive): Move
'cl-pushnew' call from 'package--download-one-archive' and cons file
name onto the archive.
(package--download-one-archive): Cons the file name onto the archive.
(package--download-and-read-archives): Remove 'cl-pushnew' call.
2022-11-02 11:56:42 +01:00
Philip Kaludercic
b21f80bbb9 ; Replace 'let*' with 'let' where possible
* lisp/emacs-lisp/package-vc.el (package-vc--select-packages): Do it.
(package-vc--read-archive-data): Do it.
2022-11-02 10:15:28 +01:00
Philip Kaludercic
bbe5a1ca83 Ensure 'package-vc-update' runs 'package-vc-unpack-1' only once
* lisp/emacs-lisp/package-vc.el (package-vc-update): Use
'vc-sourced-packages-list' and other hacks.
2022-11-01 16:35:23 +01:00
Stefan Kangas
b250f89e63 * lisp/emacs-lisp/multisession.el: Add Commentary. (Bug#58845) 2022-10-31 15:28:36 +01:00
Philip Kaludercic
17b017d55c ; Avoid loading package-vc in 'package-load-descriptor'
* lisp/emacs-lisp/package.el (package-load-descriptor): Remove the
:commit check.

The property is mostly unused anyway, and this unnecessarily slows
down initialisation if a package is installed from source.
2022-10-31 10:51:40 +01:00
Philip Kaludercic
462a66e79e ; Actually check if NAME-OR-URL is a string
* lisp/emacs-lisp/package-vc.el (package-vc-install): Use stringp as
predicate instead of binding it as a variable.
2022-10-31 10:02:03 +01:00
Philip Kaludercic
c2088c0849 Allow specifying and pinning source packages to be installed
* lisp/emacs-lisp/package-vc.el (package-vc--select-packages): Add
custom setter for 'package-vc-selected-packages'.
(package-vc-selected-packages): Add user option.
2022-10-31 10:02:03 +01:00
Philip Kaludercic
8e7bb5bb87 ; Update TODO section 2022-10-30 21:12:48 +01:00
Philip Kaludercic
2a4f37fe52 Merge remote-tracking branch 'origin/master' into feature/package+vc 2022-10-30 18:45:37 +01:00
Philip Kaludercic
d33998ed3b Have 'last-change' accept a line number instead of a range
* lisp/emacs-lisp/package-vc.el (package-vc-release-rev): Use new
signature.
* lisp/vc/vc-git.el (vc-git-last-change): Update signature
* lisp/vc/vc.el (vc-default-last-change): Update signature and use
'annotate-command'.
2022-10-30 16:52:08 +01:00
Philip Kaludercic
bb86ed20e1 Display a message after installing source packages
* lisp/emacs-lisp/package-vc.el (package-vc-unpack-1): Print message
and return t.
2022-10-30 14:57:11 +01:00
Philip Kaludercic
ec3f102b8c Prefer "Package-Version" over "Version" if available
* lisp/emacs-lisp/package-vc.el (package-vc-release-rev): Search for
both in sequence.
2022-10-30 14:43:10 +01:00
Philip Kaludercic
8b49d553b6 ; Avoid a type error on malformed "elpa-packages.eld" input
* lisp/emacs-lisp/package-vc.el: Use 'eq' instead of '='
2022-10-30 14:07:56 +01:00
Philip Kaludercic
30f1e7c1e9 Extract last source package release from local VCS data
* lisp/emacs-lisp/package-vc.el (package-vc-archive-spec-alist):
Unmention :release-rev
(package-vc-desc->spec): Fall back on other archives if a
specification is missing.
(package-vc-main-file): Add new function, copying the behaviour of
elpa-admin.el.
(package-vc-generate-description-file): Use 'package-vc-main-file'.
(package-vc-unpack): Handle special value ':last-release'.
(package-vc-release-rev): Add new function using 'last-change'.
(package-vc-install): Pass ':last-release' as REV instead of a
release.
* lisp/vc/vc-git.el (vc-git-last-change): Add Git 'last-change'
implementation.
* lisp/vc/vc.el (vc-default-last-change): Add default 'last-change'
implementation.

This attempts to replicate the behaviour of elpa-admin.el's
"elpaa--get-last-release-commit".
2022-10-30 14:04:52 +01:00
Basil L. Contovounesios
1d62c96423 ; Silence warning in last hierarchy.el change. 2022-10-30 00:44:44 +03:00
Eli Zaretskii
df7ca69920 Set 'native-comp-debug' to zero on MS-Windows
* lisp/emacs-lisp/comp.el (native-comp-debug): Don't emit debug
symbols on MS-Windows.  The default was originally made 1 because
without that, C backtraces on Windows would not show
natively-compiled functions correctly, or would even stop short of
reaching the topmost call frame.  But that turned out to be due to
a bug in GDB, which was meanwhile fixed in GDB 12.  So we can now
reset the value back to zero, and gain smaller *.eln files on
MS-Windows.
2022-10-29 18:59:04 +03:00
Alan Mackenzie
31e7b9c073 Fix the subr-arity returned by native compiled functions with lots of args
This fixes bug #58739.  Make subr-arity return, e.g., (12 . 12) rather than
(12 . many) for a function with a fixed number of arguments more than 8.

* lisp/emacs-lisp/comp.el (comp-prepare-args-for-top-level): Only return a cdr
of 'many when there are &rest arguments.

* src/eval.c (eval_sub): Also check for a fixed number of args over 8 when
using the nargs + *args calling convention.
(funcall_subr): Also check numargs <= 8 before using the fixed args calling
convention.  Include the case numargs > 8 in the aMany calling convention.

* src/lisp.h (DEFUN): Amend the comment about MANY.
2022-10-29 13:21:39 +00:00
Philip Kaludercic
a52cec7b6b
Explicitly handle :vc-backend in a package specification
* lisp/emacs-lisp/package-vc.el (package-vc-archive-spec-alist):
Document the feature.
(package-vc-unpack): Check for :vc-backend in both PKG-SPEC and the
archive specification data.
2022-10-28 20:13:28 +02:00
Philip Kaludercic
4097781655
Ensure that package specifications are always fetched
* lisp/emacs-lisp/package-vc.el (package-vc--archives-initialize): Add
new function, extending 'package--archives-initialize'.
(package-vc-install): Use new function.
(package-vc-link-directory): Use new function.
2022-10-28 20:10:30 +02:00
Philip Kaludercic
60b3eb0754
Allow specifying the VC backend used by 'package-vc-install'
* lisp/emacs-lisp/package-vc.el (package-vc-install): Add argument BACKEND.
2022-10-28 20:01:48 +02:00
Philip Kaludercic
a00ec87c0b
Update handling for new elpa-packages.eld format
* lisp/emacs-lisp/package-vc.el (package-vc-elpa-packages-version):
Add constant.
(package-vc-archive-data-alist): Add variable.
(package-vc--read-archive-data): Separate package specifications from
metadata.
(package-vc-unpack): Check archive metadata.
2022-10-28 19:58:05 +02:00
Stefan Monnier
d79cdcd4ff cconv.el: Fix regression in cconv-tests-interactive-closure-bug51695
The new code to make interpreted closures safe-for-space introduced
a regression in `cconv-tests-interactive-closure-bug51695`, only seen
when using TEST_LOAD_EL.
A few other issues were found and fixed along the way.

* lisp/emacs-lisp/cconv.el (cconv-fv): Change calling convention and
focus on finding the free variables.
(cconv-make-interpreted-closure): New function.

* lisp/loadup.el: Use `compiled-function-p` rather than
`byte-code-function-p` so we also use safe-for-space interpreted
closures when we build with native compilation.
(internal-make-interpreted-closure-function):
Use `cconv-make-interpreted-closure`.

* src/eval.c (syms_of_eval): Rename `internal-filter-closure-env-function`
to `internal-make-interpreted-closure-function`.
(Ffunction): Let that new var build the actual closure.

* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-interactive-closure-bug51695): Test specifically the
interpreted case.
2022-10-28 11:33:24 -04:00
Stefan Monnier
c0f7a276cf * lisp/emacs-lisp/re-builder.el: Cosmetic changes
(reb-valid-string): Declare it risky so the mode-line will obey its
text-properties.
(reb-lisp-syntax-p): No need to make it `defsubst`.
(reb-target-value): New function to replace the
`reb-target-binding` macro.  Adjust all callers.
(reb-auto-update): Give a more informative error message than just
"invalid" and give it a warning face.
(reb-update-regexp): Always update `reb-regexp-src` (it's harmless),
rather than only when it's necessary (reduces the need for advice in pcre.el).
2022-10-28 09:36:40 -04:00
Wamm K. D
c6ec08e49a Allow Hierarchy to delay computation of children
This adds an option to allow callers to specify that computing
the children of the hierarchy should be delayed to when the
user calls for them, by utilizing the tree-widget :expander
property.
* lisp/emacs-lisp/hierarchy.el (hierarchy-add-tree)
(hierarchy-add-trees): Add parameter 'delay-children-p'.
* lisp/emacs-lisp/hierarchy.el
(hierarchy--create-delayed-tree-widget): Add function.
* lisp/emacs-lisp/hierarchy.el (hierarchy-convert-to-tree-widget):
Utilize ':expander' if delaying children.  (Bug#55900)

* test/lisp/emacs-lisp/hierarchy-tests.el: Add tests for
delayed-children functionality.
2022-10-27 20:12:24 +03:00
Stefan Kangas
db2ed9f333 ; Fix several symbol name typos 2022-10-26 23:04:23 +02:00