Commit graph

9019 commits

Author SHA1 Message Date
Dmitry Gutov
ddfa0d8da9 ; Remove some leftover text 2023-04-28 19:28:25 +03:00
Eli Zaretskii
b33d25f596 ; Minor improvements in doc strings of package-upgrade commands
* lisp/emacs-lisp/package.el (package-upgrade)
(package-upgrade-all): Doc fixes.  (Bug#62720)
2023-04-28 08:14:37 +03:00
Dmitry Gutov
a365984d9e package-upgrade[-all]: Expand docstrings to note the current limitation
* lisp/emacs-lisp/package.el (package-upgrade, package-upgrade-all):
Expand docstrings to note the current limitation (bug#62720).
2023-04-28 02:24:10 +03:00
Dmitry Gutov
f965f35b33 Rename all functions called package-*-update-* to package-*-upgrade-*
* lisp/emacs-lisp/package-vc.el (package-vc-upgrade-all):
Rename from 'package-vc-update-all'.
(package-vc-upgrade): Rename from 'package-vc-update'.

* lisp/emacs-lisp/package.el (package-upgrade):
Rename from 'package-update' (bug#62750).
(package--upgradeable-packages):
Rename from 'package--updateable-packages'.
(package-upgrade-all): Rename from 'package-update-all'.
2023-04-28 02:12:11 +03:00
Eli Zaretskii
a0b04a2247 Documentation copyedits for 'package-install-upgrade-built-in' etc
* etc/NEWS: More details about the new option
'package-install-upgrade-built-in'.

* lisp/emacs-lisp/package.el (package-install-upgrade-built-in)
(package--active-built-in-p, package-install): Doc fixes.
(Bug#62720)
2023-04-16 18:11:07 +03:00
Philip Kaludercic
580d8278c5 Allow upgrading built-in packages with 'package-install'
* etc/NEWS: Mention the change
* lisp/emacs-lisp/package.el (package--upgradable-built-in-p): Add new
predicate.
(package-install-upgrade-built-in): Add new user option to enable
feature.
(package-install): Respect new user option.
2023-04-16 15:44:26 +02:00
Earl Hyatt
6e6e8b5c97 Add more documentation for the keys of package-vc-selected-packages.
* doc/emacs/package.texi (Specifying Package Sources): List the
accepted keys in a new subsection of Fetching Package Sources.

* lisp/emacs-lisp/package-vc.el (package-vc-selected-packages):
Mention the `:doc` key.  Add the `:doc` key to the Customize form,
mention the new Info node, correct "TexInfo" to "Texinfo", avoid
Git-specific terms for the description of `:branch`, mention guessing
`:vc-backend` based on the URL.
2023-04-12 09:45:52 +02:00
Philip Kaludercic
59f66ea302 ; * lisp/emacs-lisp/package-vc.el: Remove completed item from TODO 2023-03-30 23:28:30 +02:00
Philip Kaludercic
d23dc3dd7e ; * lisp/emacs-lisp/package-vc.el (package-vc): Fix manual reference 2023-03-30 23:28:30 +02:00
Andrea Corallo
ab4273056e Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* test/src/comp-tests.el (61917-1): New test.
	* src/comp.c (syms_of_comp): New variable.
	* lisp/loadup.el: Store primitive arities before dumping.
	* lisp/emacs-lisp/comp.el (comp--func-arity): New function.
	(comp-emit-set-call-subr): Make use of `comp--func-arity'.
2023-03-29 22:25:04 +02:00
Andrea Corallo
a8c9283e17 Revert "Comp fix calls to redefined primtives with op-bytecode (bug#61917)"
This reverts commit 263d6c3853.

These patch series caused a number of regression and more analysis is
required.
2023-03-28 15:47:54 +02:00
Andrea Corallo
8b66d8abd0 Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve..."
This reverts commit 4a7a0c9a9f.

These patch series caused a number of regression and more analysis is
required.
2023-03-28 15:47:47 +02:00
Matus Goljer
564c26bdbe ; Fix edebug spec for 'gv-define-simple-setter' (bug#62256) 2023-03-26 14:38:53 +03:00
Eli Zaretskii
bcd02cf512 ; Improve documentation of :predicate in globalized minor modes
* doc/lispref/modes.texi (Defining Minor Modes):
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Improve documentation of the :predicate keyword in defining
globalized minor modes.
2023-03-23 11:30:19 +02:00
Stefan Monnier
930b9fdd3a Fix :predicate handling in globalized minor modes
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Fix a thinko.  (Bug#62376)
2023-03-23 11:03:07 +02:00
Andrea Corallo
4a7a0c9a9f * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve 263d6c3853 2023-03-21 12:10:31 +01:00
Andrea Corallo
263d6c3853 Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Fix compilation
of calls to redefined primtives with dedicated op-bytecode.
* test/src/comp-tests.el (61917-1): New test.
2023-03-20 19:01:26 +01:00
Philip Kaludercic
27edd7f88c Remove 'package-vc--query-spec'
* lisp/emacs-lisp/package-vc.el (require): Do not load `inline' during
compilation.
(package-vc--query-spec): Remove function.
(package-vc--clone): Do not call 'package-vc--query-spec'.
2023-03-15 10:28:14 +01:00
Philip Kaludercic
39fea11551 Do not store :lisp-dir in package descriptors
* lisp/emacs-lisp/package-vc.el (package-vc--main-file)
(package-vc--unpack-1): Query 'pkg-spec' instead of
'package-desc-extras'.
(package-vc--unpack): Do not update 'package-desc-extras'.

This simplification is possible due to the change in 2718bbb3bc, since
we now ensure that package specifications are not lost.  They are
either provided by a package archive or stored in
'package-vc-selected-packages'.
2023-03-15 10:28:14 +01:00
Philip Kaludercic
168165178f Use 'package-vc-selected-packages' to store package specs
* doc/emacs/package.texi (Fetching Package Sources): Do not promote
the usage of 'package-vc-selected-packages' to install packages.
* lisp/emacs-lisp/package-vc.el (package-vc-selected-packages): Remove
custom setter and change docstring according to these changes.
(package-vc--desc->spec): Consult 'package-vc-selected-packages' for
package specifications.
(package-vc--unpack): Add unknown package specifications to
'package-vc-selected-packages'
2023-03-15 10:27:58 +01:00
Andrea Corallo
8a2a554192 * Make sure `default-directory' exists before spawning processes (bug#62004)
* lisp/emacs-lisp/comp.el (comp-final, comp-run-async-workers): Bind
`default-directory' to `invocation-directory'.
2023-03-08 21:16:12 +01:00
Andrea Corallo
4a7e657389 * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (bug#61917) 2023-03-06 17:23:15 +01:00
Eli Zaretskii
2258ed01f4 ; Minor fix of last change
* lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Fix
wording.  (Bug#61880)
2023-03-05 12:24:39 +02:00
Andrea Corallo
9c18af0cfa * Warn when certain primitives are redefined (bug#61880)
* lisp/emacs-lisp/comp.el (comp-warn-primitives): New constant.
	(comp-subr-trampoline-install): Warn when a sensitive primitive is
	being redefined.
2023-03-05 11:06:37 +01:00
Stefan Monnier
1f1d36fa80 * lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Fix bug#61847
The `noerror` arg of `require` doesn't do what Stefan naively thought
when he wrote this code, so use `condition-case` instead.
Also check for `cl-defmethod` since `cl-prin1` can't be loaded before
that anyway.
2023-03-01 12:31:09 -05:00
Eli Zaretskii
99df815c15 Revert "Don't disable eldoc when doing edebug"
This reverts commit 6fd1fb8a68.
It turns out ElDoc does show messages inside Edebug, if you
are (un)lucky enough to have point where ElDoc has something
to show.  Bug#56459 needs to be fixed in some more complex
way.
2023-03-01 17:35:51 +02:00
Philip Kaludercic
b2ae4e77c7 Avoid reusing :lisp-dir twice in 'package-vc--main-file'
* lisp/emacs-lisp/package-vc.el (package-vc--main-file): Just use
:lisp-dir from 'package-desc-extras', not 'pkg-spec'.

This avoid appending the contents of :lisp-dir twice, in case it is
specified both in pkg-spec and pkg-desc.
2023-02-24 17:14:19 +01:00
Philip Kaludercic
068f8fa303 Ensure right package-desc-type before installing package
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Move copying
code from 'package-vc-install'.
(package-vc-install): Remove copying.  (Bug#61669)
2023-02-24 17:14:19 +01:00
Yuan Fu
94e70ed426
; * lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area): Fix typo. 2023-02-22 17:55:30 -08:00
Robert Pluim
cf53e62a79 Add 'process-status' to process shortdoc
* lisp/emacs-lisp/shortdoc.el (process): Add 'process-status'.
2023-02-21 16:48:18 +01:00
Andrea Corallo
68df9e5953 * lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Improve 5d0b45cd67 2023-02-21 16:39:39 +01:00
Andrea Corallo
5d0b45cd67 Make the native compiler always use `make-temp-file' for temporary files
* src/comp.c (CALL4I): Define macro.
(Fcomp__compile_ctxt_to_file): Use `make-temp-file' instead of
`make-temp-file-internal'.
* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Likewise.
2023-02-20 21:16:04 +01:00
Stefan Kangas
9a6f22fd0b Merge from origin/emacs-28
f5a99945b6 ; Update ChangeLog for Emacs 28.3
f7bd5ac552 Update HISTORY for Emacs 28.3

# Conflicts:
#	etc/NEWS
2023-02-19 17:37:59 +01:00
Eli Zaretskii
4faebba2fe Fix invocation of File->Close from the menu bar
* lisp/simple.el (kill-buffer--possibly-save): Don't request
LONG-FORM from 'read-multiple-choice' if GUI dialog should be
used.
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Doc fix.
(read-multiple-choice--short-answers): Don't append "?" to
CHOICES and don't display the prompt in the echo area if GUI
dialog is used.  Use 'use-dialog-box-p'.  (Bug#61553)
2023-02-19 11:29:32 +02:00
Andrea Corallo
c15bc91e1b * Fix `native-comp-enable-subr-trampolines' semantic
* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Interpret
`native-comp-enable-subr-trampolines' relative to
`invocation-directory'.
2023-02-18 22:44:05 +01:00
Stefan Kangas
4f9862e435 ; Fix typo 2023-02-18 13:39:28 +01:00
Eli Zaretskii
8aad8d75aa ; Improve and update documentation of native compilation
* src/comp.c (syms_of_comp) <native-comp-enable-subr-trampolines>
<native-comp-eln-load-path>: Doc fixes.

* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions):
Doc fix.

* doc/lispref/compile.texi (Native-Compilation Variables):
Document 'native-comp-jit-compilation' and
'native-comp-enable-subr-trampolines'.
2023-02-17 16:15:51 +02:00
Andrea Corallo
d6e4f24372 Merge 'emacs-29' into 'feature/inhibit-native-comp-cleanup' 2023-02-17 11:14:38 +01:00
Philip Kaludercic
40f4bc4e0a ; Avoid installing VC package dependencies multiple times
* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
Check if two package names are eq, instead checking the structural
equality of package-desc objects.
2023-02-16 11:38:51 +01:00
Philip Kaludercic
1c9d81a2b4 Attempt to recognise if a VC package has no Elisp files
* lisp/emacs-lisp/package-vc.el (package-vc-non-code-file-names): Add
new variable used to avoid false-positives.
(package-vc--unpack): Recursively search for .el files excluding the
ones listed in 'package-vc-non-code-file-names', offering to abort the
installation if none are found.
2023-02-16 11:11:23 +01:00
Gregory Heytings
5206a551c1 Improve backward compatibility of save-restriction
* src/editfns.c (save_restriction_save_1): Renamed from
'save_restrictions_save'.  Make it static.
(save_restriction_restore_1): Renamed from
'save_restriction_restore'.  Make it static.
(save_restriction_restore): New function, combining
'save_restriction_save_1' and 'narrowing_locks_save'.
(save_restriction_save): New function, combining
'save_restriction_restore_1' and 'narrowing_locks_restore'.
(Fsave_restriction): Restore the previous code.
(narrowing_locks_save, narrowing_locks_restore): Make them static.

* src/lisp.h: Remove two functions that are not externally visible
anymore.

* src/comp.c (helper_save_restriction): Restore the previous code.

* src/bytecode.c (exec_byte_code): Restore the previous code.

* lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction):
Decrement unbinding count.
2023-02-14 21:41:35 +01:00
Philip Kaludercic
a3751b5d0c ; Raise an error if a VC package checkout is empty
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Check if PKG-DIR
is empty before proceeding with the installation.
2023-02-14 19:50:01 +01:00
Philip Kaludercic
6a32ba8b69 ; Fix the installation of dependencies for VC packages
* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
Work with package-desc objects instead of (PACKAGE-NAME VERSION)
pairs.
2023-02-14 19:50:01 +01:00
Andrea Corallo
ce4a066ed1 * Generate trampolines in a temporary directory if no other option is viable
* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Use
temporary file if no other option is viable.
2023-02-14 12:27:58 +01:00
Andrea Corallo
1a64f326e0 * Fix previous change
* lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer):
Fix previous change b6e2799aa1.
2023-02-13 17:07:25 +01:00
Andrea Corallo
95692f6754 Rename native-comp-deferred-compilation-deny-list
* lisp/emacs-lisp/comp.el (native-comp-jit-compilation-deny-list)
	(native-compile-async-skip-p): Rename
	native-comp-deferred-compilation-deny-list into
	native-comp-jit-compilation-deny-list.
	(native-comp-deferred-compilation-deny-list): Mark it obsolete.
2023-02-13 17:06:13 +01:00
Andrea Corallo
8d8464bd5a Rename native-comp-deferred-compilation into native-comp-jit-compilation
* src/comp.c (maybe_defer_native_compilation, syms_of_comp):
	Rename native-comp-deferred-compilation into
	native-comp-jit-compilation.

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

	* lisp/startup.el (native-comp-deferred-compilation)
	(normal-top-level): Rename native-comp-deferred-compilation into
	native-comp-jit-compilation.

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

	* lisp/emacs-lisp/generate-lisp-file.el
	(generate-lisp-file-trailer): Likewise.
2023-02-13 17:04:22 +01:00
Andrea Corallo
5d0912f144 Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines
* src/data.c (Ffset): Rename comp-enable-subr-trampolines into
	native-comp-enable-subr-trampolines.

	* src/comp.c (syms_of_comp): Likewise.

	* lisp/subr.el (comp-enable-subr-trampolines): Make
	comp-enable-subr-trampolines obsolete.

	* lisp/startup.el (native-comp-enable-subr-trampolines)
	(normal-top-level): Rename comp-enable-subr-trampolines into
	native-comp-enable-subr-trampolines.

	* lisp/loadup.el (dump-mode): Likewise.

	* lisp/emacs-lisp/comp.el (comp-subr-trampoline-install)
	(comp--trampoline-abs-filename): Likewise.
2023-02-13 17:02:38 +01:00
Andrea Corallo
abfd00e5c0 * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Improve doc 2023-02-13 12:49:05 +01:00
Andrea Corallo
1795839bab Support `comp-enable-subr-trampolines' as string value
* src/comp.c (syms_of_comp): Update `comp-enable-subr-trampolines'.

* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions)
(comp--trampoline-abs-filename): Support
`comp-enable-subr-trampolines' string value.

* src/data.c (Ffset): Use Vcomp_enable_subr_trampolines now.
2023-02-13 12:48:09 +01:00