Commit graph

8855 commits

Author SHA1 Message Date
Andrea Corallo
1a8015b837 * Prevent potential native compilation infinite recursions
* lisp/emacs-lisp/comp.el (comp-no-spawn): New var.
(comp-subr-trampoline-install, comp-final, comp-run-async-workers)
(comp--native-compile): Update.
2022-10-18 10:42:13 +02:00
Stefan Kangas
eff4a4f49a Improve native-compile-prune-cache messages
* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Quote name of
pruned directory.
2022-10-17 15:28:25 +02:00
Stefan Kangas
40b734c500 Don't prune *.eln files in parent of eln-load-path
* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Don't
prune *.eln files in parent directory of `native-comp-eln-load-path'.
* test/lisp/emacs-lisp/comp-tests.el
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
New test.
2022-10-17 15:26:34 +02:00
Lars Ingebrigtsen
b9aff5fdb8 Fix spurious "Compilation finished" native-comp messages
* lisp/emacs-lisp/comp.el (native--compile-async): Don't start the
async compilation if we didn't add anything.  This avoids spurious
"Compilation finished" messages in the *Async* buffer when it
turned out that all the files we considered nativecomping were
skipped.
2022-10-17 14:30:54 +02:00
Lars Ingebrigtsen
5176d00611 Avoid having the async compile log saying it's compiling loaddefs
* lisp/loadup.el (featurep): Define the hash table in nativecomp
builds (but not otherwise).  A more natural place to define this
would be in comp.el, but comp.el isn't loaded yet when we load the
.elc file that updates comp--no-native-compile.  We could change
the load order and move the definition to comp.el, though.

* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Allow
inhibiting nativecomp earlier (bug#57627).

* lisp/emacs-lisp/comp.el (native-compile-async-skip-p): Use the data.
2022-10-17 10:48:20 +02:00
Philip Kaludercic
39c9b6751e
Only clone packages if necessary
* lisp/emacs-lisp/package-vc.el (package-vc-unpack): Check if
directory exists before cloning.
2022-10-17 00:13:06 +02:00
Stefan Monnier
13d6e8fa54 cl-generic: Fix advertised-calling-convention declarations
* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):
Preserve the `advertised-calling-convention`, if any (bug#58563).

* lisp/subr.el (declare): Warn when we hit this.

* lisp/emacs-lisp/byte-run.el (get-advertised-calling-convention): New fun.
* lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string):
* lisp/help-fns.el (help-fns--signature):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition): Use it.

* test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-tests--acc): New fun.
(cl-generic-tests--advertised-calling-convention-bug58563): New test.
2022-10-16 12:01:47 -04:00
Philip Kaludercic
b4e833b2f8
Attempt to infer the package subject if missing
* lisp/emacs-lisp/package-vc.el (package-vc-main-file): Add function.
(package-vc-generate-description-file): Infer the subject.
2022-10-16 17:18:06 +02:00
Philip Kaludercic
5134eb02cf
Mark source packages as always updatable
* lisp/emacs-lisp/package.el (package--updateable-packages): Add check
for source packages.
2022-10-16 13:40:24 +02:00
Philip Kaludercic
3f7e746b51
Delete 'package-contact-maintainer'
* doc/emacs/package.texi: Remove mention.
* etc/NEWS: Remove mention.
* lisp/emacs-lisp/package.el: Remove the command.
2022-10-16 13:40:08 +02:00
Philip Kaludercic
01e45efcd4
Merge branch 'master' into feature/package+vc 2022-10-15 17:38:30 +02:00
Philip Kaludercic
5fc064f14c
Handle ;;;###theme-autoload comments in etc/themes
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--emacs-batch):
Extract the autoloads and have them loaded along with loaddefs.el.
* etc/NEWS: Mention the new feature.  (Bug#57639)
2022-10-15 17:22:48 +02:00
Philip Kaludercic
da2e6da722
Tag themes with properties
* doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'.
* doc/lispref/customize.texi (Custom Themes): Document the new
optional argument to 'deftheme'.
(Autoload): Mention that 'deftheme' is not copied verbatim.
* etc/themes/adwaita-theme.el (adwaita): Add properties.
* etc/themes/deeper-blue-theme.el (deeper-blue): Add properties.
* etc/themes/dichromacy-theme.el (dichromacy): Add properties.
* etc/themes/light-blue-theme.el (light-blue): Add properties.
* etc/themes/manoj-dark-theme.el (manoj-dark): Add properties.
* etc/themes/misterioso-theme.el (misterioso): Add properties.
* etc/themes/tango-dark-theme.el (tango-dark): Add properties.
* etc/themes/tango-theme.el (tango): Add properties.
* etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties.
* etc/themes/tsdh-light-theme.el (tsdh-light): Add properties.
* etc/themes/wheatgrass-theme.el (wheatgrass): Add properties.
* etc/themes/whiteboard-theme.el (whiteboard): Add properties.
* etc/themes/wombat-theme.el (wombat): Add properties.
* etc/themes/modus-operandi-theme.el: Add properties.
* etc/themes/modus-vivendi-theme.el: Add properties.
* etc/themes/leuven-dark-theme.el (leuven-dark): Add properties.
* etc/themes/leuven-theme.el (leuven): Add properties.
* lisp/custom.el (deftheme): Allow for optional arguments to set the
property list.
(custom-declare-theme): Accept the same optional arguments as 'deftheme'.
(theme-list-variants): Add new function.
(theme-choose-variant): Add new command for switching between members
of a theme family.
(toggle-theme): Add an alias for 'theme-choose-variant'.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Handle 'defcustom's by extracting the properties.  (Bug#57639)
2022-10-15 17:22:48 +02:00
Stefan Kangas
8300899953 Use file-size-human-readable in memory-report--format
* lisp/emacs-lisp/memory-report.el (memory-report--format): Use
file-size-human-readable.
2022-10-15 03:02:17 +02:00
Philip Kaludercic
73669f73e6
Allow specifying a package name for 'package-vc-link-directory'
* lisp/emacs-lisp/package-vc.el (package-vc-link-directory): Add argument NAME
2022-10-12 21:25:54 +02:00
Philip Kaludercic
0e3b67e3a3
* lisp/emacs-lisp/package-vc.el (package-vc-refresh): Add function. 2022-10-12 21:21:38 +02:00
Philip Kaludercic
0610e6f9f1
Rename 'package-vc-link-project' to 'package-vc-link-directory'
* lisp/emacs-lisp/package-vc.el (package-vc-link-project): Rename it.
2022-10-12 20:42:19 +02:00
Philip Kaludercic
22d768a29d
Run 'package-vc-unpack-1' after updating source packages
* lisp/emacs-lisp/package-vc.el (package-vc-update): Call
'package-vc-unpack-1'.
2022-10-12 20:26:17 +02:00
Philip Kaludercic
576593a2b2
Add new command to install a package via symbolic linking
* lisp/emacs-lisp/package-vc.el (package-vc-unpack-1): Add new function.
(package-vc-unpack): Use 'package-vc-unpack-1'.
(package-vc-link-project): Add new command.
2022-10-12 17:11:21 +02:00
Philip Kaludercic
4a25205ec1
Only use 'package-vc-repository-store' if necessary
* lisp/emacs-lisp/package-vc.el (package-vc-unpack): Check if the
upstream data indicates a custom lisp directory.
* lisp/emacs-lisp/package.el (package--delete-directory): Adapt
accordingly.
2022-10-12 14:49:35 +02:00
Andrea Corallo
3744720904 Add trampoline AOT compilation target (bug#58318)
* Makefile.in (trampolines): New target.
* lisp/Makefile.in (trampolines): Likewise.
* lisp/emacs-lisp/comp.el (comp-compile-all-trampolines): New
function.
2022-10-11 21:19:21 +02:00
Philip Kaludercic
8e6e6e6de5
Rename 'package-vc-fetch' to 'package-vc-install'
* lisp/emacs-lisp/package-vc.el (package-vc-fetch): Rename to preserve
symmetry with 'package-install'.
(package-checkout): Follow the previous rename.
2022-10-09 23:37:29 +02:00
Philip Kaludercic
f74d52954b
* lisp/emacs-lisp/package-vc.el: Autoload 'package-vc-prepare-patch' 2022-10-08 18:22:03 +02:00
Stefan Monnier
8de7995ae6 package.el: Understand a few more variations in tarball formats
* lisp/emacs-lisp/package.el (package-untar-buffer): Fix thinko.
(package-tar-file-info): Handle the case where the first file is in
a subdirectory.

* test/lisp/emacs-lisp/package-tests.el (package-test-bug58367): New test.
* test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tar:
* test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tar: New files.
2022-10-08 12:19:40 -04:00
Lars Ingebrigtsen
5017f2573f Fix vtable-insert-object line insertion
* lisp/emacs-lisp/vtable.el (vtable-insert-object): Pass in the
correct ellipsis values (bug#58370).
(vtable--insert-line): Don't bug out on missing optional arguments.
2022-10-08 15:26:01 +02:00
Lars Ingebrigtsen
6b56099268 Mention seq-keep in shortdoc
* lisp/emacs-lisp/shortdoc.el (sequence): Mention seq-keep.
2022-10-08 13:20:17 +02:00
Philip Kaludercic
a4a825df82
Clone packages into a separate directory
* lisp/emacs-lisp/package-vc.el (package-vc-repository-store): Add new
user option.
(package-vc-unpack): Use 'package-vc-repository-store'.
* lisp/emacs-lisp/package.el (package--delete-directory): Check and
handle source packages.
(package-delete): Invoke 'package--delete-directory' with an
additional argument.
2022-10-08 11:57:38 +02:00
Philip Kaludercic
7c66223dfb
* lisp/emacs-lisp/package.el (package-report-bug): Use 'file-in-directory-p' 2022-10-08 11:57:38 +02:00
Philip Kaludercic
432252c23f
Extend package-vc heuristics to multiple source forges
* package-vc.el (package-vc-probable-repository-regexp): Rename to
'package-vc-heusitic-alist'.
(package-vc-heusitic-alist): Add support for multiple VC backends.
(package-vc-sourced-packages-list): Use 'package-vc-heusitic-alist'
2022-10-08 11:57:38 +02:00
Philip Kaludercic
077c1533df
; * package-vc.el (package-vc-read-pkg): Return package description 2022-10-08 11:57:38 +02:00
Philip Kaludercic
f9065c7951
Use 'package-vc-p' in package-vc.el
* package-vc.el (package-vc-commit): Use it instead of 'eq'.
(package-vc-version): Use it instead of 'eq'.
2022-10-08 11:57:38 +02:00
Philip Kaludercic
e092e60f15
Add a package-vc command for submitting ptches
* lisp/emacs-lisp/package-vc.el (package-vc-read-pkg): Add auxiliary
command for querying source packages.
(package-vc-prepare-patch): Add it.
* lisp/emacs-lisp/package.el (package-maintainers): Add an optional
NO-ERROR argument.
2022-10-08 11:57:38 +02:00
Philip Kaludercic
effe1f20f5
Extract package maintainer guessing code into a separate function
* package.el (package-maintainers): Add new function.
(package-contact-maintainer): Use it.
(package-report-bug): Use it.
2022-10-08 11:57:37 +02:00
Philip Kaludercic
e75994f2ff
Add an inline procedure for checking for source packages
* package.el (eval-when-compile): Require 'inline during compilation.
(package-vc-p): Add inline function.
(package-desc-full-name): Use it.
(package-load-descriptor): Use it.
(package--get-activatable-pkg): Use it.
(package-install-from-archive): Use it.
(package-update): Use it.
(package-desc-status): Use it.
(package--remove-hidden): Use it.
(package-menu--print-info-simple): Use it.
2022-10-08 11:57:37 +02:00
Philip Kaludercic
8cfeb8a9e0
Merge branch 'master' into feature/package+vc 2022-10-08 11:56:23 +02:00
Stefan Kangas
89ccf78db2 ; Silence byte-compiler in benchmark.el
* lisp/emacs-lisp/benchmark.el (cl-lib): Require.
2022-10-07 23:15:13 +02:00
Mattias Engdegård
6b4c17dec0 Clearer byte-compiler arity warnings (bug#58319)
* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature-string):
Replace '3+' and '3-4' with '3 or more' and '3 or 4', respectively.
2022-10-07 13:57:54 +02:00
Stefan Kangas
6c956de80a Improve package-check-signature docstring
* lisp/emacs-lisp/package.el (package-check-signature): Improve
docstring.
2022-10-07 11:27:26 +02:00
Philip Kaludercic
7c11398ca0
Add a generic bug reporting command for packages
* lisp/emacs-lisp/package.el (package-menu-mode-map): Bind
'package-report-bug'.
(package-report-bug): Add new command.
2022-10-06 22:03:15 +02:00
Matt Armstrong
e24f276f8a Fix calling `package-reinstall' just after quick initialization.
* lisp/emacs-lisp/package.el (package-reinstall): call
`package--archives-initialize', just like `package-install' does.
This populates `package-alist', and so fixes calling
`package-reinstall' as the first thing done after package "quick
init" (Bug#53527).
2022-10-06 14:08:20 +02:00
Lars Ingebrigtsen
92df7cd923 Add 'seq-keep'
* doc/lispref/sequences.texi (Sequence Functions): Document it.
* lisp/emacs-lisp/seq.el (seq-keep): New function (bug#58278).
2022-10-04 21:44:52 +02:00
Lars Ingebrigtsen
79d9f3b845 Make `eq' obsolete as a generalized variable
* lisp/emacs-lisp/gv.el (eq): Make obsolete as a generalized
variable.
2022-10-04 14:11:13 +02:00
Lars Ingebrigtsen
9fb0aaa1ce Make loaddefs-generate more resilient
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Don't bug
out when there's an existing loaddefs file that's not formatted
properly (bug#58280).
2022-10-04 13:04:16 +02:00
Lars Ingebrigtsen
535eec3bca Don't bug out in advice--make-docstring when there's not doc string
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Don't bug
out on functions with no documentation (bug#58284).
2022-10-04 12:50:17 +02:00
Jim Porter
43eaa05ff2 ; Fix logic of $HOME adjustment for 'ert-remote-temporary-file-directory'
* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Only
adjust $HOME when it doesn't exist (bug#58265).
2022-10-03 17:42:37 -07:00
Lars Ingebrigtsen
f97993ee66 Rename to inhibit-automatic-native-compilation
* src/comp.c (maybe_defer_native_compilation):
(syms_of_comp):
* lisp/subr.el (native-comp-deferred-compilation):
* lisp/startup.el (inhibit-native-compilation):
(normal-top-level):
* lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load):
* lisp/emacs-lisp/comp.el (comp-trampoline-compile):
* etc/NEWS:
* doc/lispref/compile.texi (Native-Compilation Variables): Rename
inhibit-native-compilation to inhibit-automatic-native-compilation.
2022-10-03 19:50:03 +02:00
Lars Ingebrigtsen
5fec9182db Add new variable 'inhibit-native-compilation'
* doc/lispref/compile.texi (Native-Compilation Variables):
Document it.

* lisp/startup.el (normal-top-level): Set
inhibit-native-compilation from environment variable.

* lisp/subr.el (native-comp-deferred-compilation): Make obsolete.

* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Don't write
trampolines to disk.

* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Adjust.

* src/comp.c (syms_of_comp): New variable
inhibit-native-compilation.
(maybe_defer_native_compilation): Use it.
2022-10-03 15:26:13 +02:00
Stefan Kangas
655c92ce4a Fix more overly long docstrings in eieio
* lisp/emacs-lisp/eieio.el (defclass): Fix more overly long
docstrings.  (Bug#58252)
2022-10-03 00:04:23 +02:00
Stefan Kangas
0a40120b40 Fix overly wide docstrings generated by eieio
* lisp/emacs-lisp/eieio-core.el (eieio-make-class-predicate)
(eieio-make-child-predicate, eieio-defclass-internal): Don't generate
overly wide docstrings.  (Bug#58252)
2022-10-02 17:28:04 +02:00
Stefan Kangas
423bdd5f7f ; Fix typos (prefer American spelling) 2022-09-29 15:20:07 +02:00