Commit graph

659 commits

Author SHA1 Message Date
Stefan Kangas
419ca81809 Merge from origin/emacs-29
6c00d126e7 Remove remaining mentions of 'eval-current-buffer'
1073e96170 ; * doc/lispref/text.texi (Database): Fix a typo.  (Bug#6...
b1e68a33d8 Update to Org 9.6-61-g63e073f
dad73e4de1 ; Review and fix NEWS and related documentation
72786ae237 ; Restore ARGS argument in c-ts-mode--fontify-declarator
940ab2423c ; Always consider :lisp-dir when locating main file of VC...
9ab98cd42a Add heuristic to locate lisp code in source packages
dda011c78d ; * doc/lispref/parsing.texi (Tree-sitter major modes): F...
d62b634d8f ; * src/process.c (Fprocess_running_child_p): Doc fix.
f6c5b3d635 ; * doc/lispref/parsing.texi: Add a reminder.
e6c49c0454 ; Fix byte-copmiler warning in c-ts-mode--fontify-declarator
4234033a47 ; * lisp/treesit.el: Add some comments.
79584a206b Further generalize treesit-defun functions
a819ca5a93 Generalize treesit-defun functions to "things"
e8b34109ee Reorder optional arguments to 'package-vc-install'
b38e56d8a9 Handle missing dependencies for source packages
7bc7b6b4dd ; Partial revert of f3e7820b
2cec78254e ; * nt/INSTALL.W64: Fix wording.
ecee3bd420 ; Fix recent changes in treesit documentation

# Conflicts:
#	etc/NEWS
2022-12-26 06:30:21 +01:00
Philip Kaludercic
7bc7b6b4dd ; Partial revert of f3e7820b
* lisp/emacs-lisp/package.el (package-install-from-archive): Check if
a package is a directory package, not a VC package
2022-12-25 09:36:01 +01:00
Philip Kaludercic
3b226f769e * lisp/emacs-lisp/package.el (package-report-bug): Autoload it. 2022-12-17 12:18:55 +01:00
Stefan Kangas
3e349ee119 Fix error message when installing non-existent package
* lisp/emacs-lisp/package.el (package-compute-transaction): Don't add
trailing dash to package name in non-existent package
error.  (Bug#59923)
2022-12-11 19:02:44 +01:00
Stefan Kangas
70ecdebc92 ; Fix typos (don't abbreviate "with" or "without") 2022-12-01 16:36:09 +01:00
muffinmad
832b013ef0 Insert news for installed packages only
* lisp/emacs-lisp/package.el (describe-package-1): Check package is
installed and "news" is a regular file.  (Bug#59684)
2022-11-30 20:27:41 +01:00
Philip Kaludercic
cc6efa7992 ; Fix type error in 'package-maintainers'
* lisp/emacs-lisp/package.el (package-maintainers): Pass the email
address to 'ietf-drums-parse-address' (Bug#59676).
2022-11-30 20:27:41 +01:00
Philip Kaludercic
ca42ff5f0e Consistently refer to VC packages as such
* lisp/emacs-lisp/package-vc.el: Replace instances of "source package"
in comments and docstrings.
* lisp/emacs-lisp/package.el: Replace instances of "source package" in
comments and docstrings.
2022-11-27 15:32:00 +01:00
Philip Kaludercic
a3fcc4ed0f Don't break when loading VC packages on older Emacs versions
* lisp/emacs-lisp/package-vc.el
(package-vc--generate-description-file): Append a :kind property
instead of modifying the version number.
* lisp/emacs-lisp/package.el (package-desc): Remove special handling
for "vc annotated" versions.  (bug#59404)
2022-11-23 19:35:41 +01:00
Philip Kaludercic
00aebdc182 * lisp/emacs-lisp/package.el (package-maintainers): Improve error handling 2022-11-19 14:07:09 +01:00
Stefan Kangas
f7ee6609ae ; Fix typos (prefer US spelling) 2022-11-18 13:06:55 +01:00
Philip Kaludercic
2ed115fc3c Fix indefinite loading of asynchronous downloads
* lisp/emacs-lisp/package.el (package--download-one-archive): Only add
the archive that is actually being downloaded to
'package--downloads-in-progress'.
2022-11-17 20:37:28 +01:00
Philip Kaludercic
ccd7ab84c5 Fix edebug spec for 'package--with-response-buffer'
* lisp/emacs-lisp/package.el (package--with-response-buffer): Add a
spec that makes the macro debuggable.
2022-11-17 20:37:28 +01:00
Philip Kaludercic
d67b66f8ab Respect :lisp-dir in package specs by loading a sub-directory
* lisp/emacs-lisp/package-vc.el (package-vc-repository-store): Remove
obsolete variable.
(package-vc--unpack-1): Respect :lisp-dir.
(package-vc--unpack): Add :lisp-dir to the package description if
necessary.
* lisp/emacs-lisp/package.el (package--delete-directory): Check if a
directory is a symbolic link.
2022-11-17 20:37:28 +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
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
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
2a4f37fe52 Merge remote-tracking branch 'origin/master' into feature/package+vc 2022-10-30 18:45:37 +01:00
Stefan Kangas
db2ed9f333 ; Fix several symbol name typos 2022-10-26 23:04:23 +02:00
Philip Kaludercic
5d60ea47f6
Use 'elpa-packages' files for VC metadata
* lisp/emacs-lisp/package-vc.el (package-vc-default-backend): Add new
option.
(package-vc-archive-spec-alist): Add new variable to store the
contents of 'elpa-packages' for each archive.
(pacakge-vc-desc->spec): Add function to query package specifications.
(package-vc--read-archive-data): Add a 'package-read-archive-hook'
implementation.
(package-vc--download-and-read-archives): Add a
'package-refresh-contents-hook' implementation.
(package-vc-main-file): Remove function.
(package-vc-generate-description-file): Use package specifications.
(package-vc-unpack-1): Adapt to previous changes.
(package-vc-unpack): Adapt to previous changes.
(package-vc-sourced-packages-list): Adapt to previous changes.
(package-vc-install): Adapt to previous changes.
* lisp/emacs-lisp/package.el (package-read-archive-hook): Allow
extending 'package-read-all-archive-contents' using a hook.
(package-read-all-archive-contents): Use 'package-read-archive-hook'.
(package-refresh-contents-hook): Allow extending
'package-refresh-contents' using a hook.
(package-refresh-contents): Use 'package-refresh-contents-hook'.
2022-10-18 22:35:25 +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
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
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
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
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
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
Lin Sun
ec121e035b package-update would always re-install package
* lisp/emacs-lisp/package.el (package--updateable-packages): fix
version comparison between available packages and archived
packages (bug#58129).
2022-09-28 13:05:26 +02:00
Lars Ingebrigtsen
26e56540da Don't overwrite error message in `x' in package.el
* lisp/emacs-lisp/package.el (package-menu--perform-transaction):
Return whether there were errors.
(package-menu-execute): Don't overwrite the error message(s) with
a success message (bug#51201).
2022-09-12 14:17:25 +02:00
Stefan Kangas
6cd9e586cc New function substitute-quotes
* lisp/help.el (substitute-quotes): New function.  (Bug#51040)
* doc/lispref/help.texi (Keys in Documentation): Document
substitute-quotes.
* test/lisp/help-tests.el (help-tests-substitute-quotes): New test.

* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-theme.el (describe-theme-1):
* lisp/emacs-lisp/cl-extra.el (cl--describe-class):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/package.el (describe-package-1):
* lisp/help-fns.el (help-fns--parent-mode, help-fns--var-risky)
(help-fns--var-file-local, help-fns--var-bufferlocal)
(describe-face):
* lisp/help.el (substitute-command-keys):
* lisp/progmodes/octave.el (octave-help): Use the new function
instead of 'substitute-command-keys'.
2022-09-10 07:37:36 +02:00
Philip Kaludercic
1823349e6a
Merge remote-tracking branch 'origin/master' into feature/package+vc 2022-08-12 16:05:05 +02:00
Stefan Kangas
8ae68308a1 Use help-key-binding face in package list help
* lisp/emacs-lisp/package.el (package--prettify-quick-help-key):
Use help-key-binding face.
2022-08-12 15:08:19 +02:00
Philip Kaludercic
dd98fedd0c
* package.el (describe-package-1): Add news if avaliable 2022-08-11 14:06:43 +02:00
Philip Kaludercic
fb87d5008e
* package.el (package--get-activatable-pkg): Prefer source packages 2022-08-11 13:35:47 +02:00
Philip Kaludercic
f5bb6b0131
Allow updating source packages
* lisp/emacs-lisp/package-vc.el (package-vc-update): Add new function.
* lisp/emacs-lisp/package.el (package-update): Use 'package-vc-update'.
2022-08-11 13:23:51 +02:00
Philip Kaludercic
9ddc23cd34
Ignore files in .elpaignore during byte compilation
* package.el (package--parse-elpaignore): Add new function.
(package--compile): Bind 'byte-compile-ignore-files' to the result of
'package--parse-elpaignore'.
2022-08-11 12:47:28 +02:00
Lars Ingebrigtsen
f038695085 Minor cleanups in autoload.el/loaddefs-gen.el
* lisp/subr.el (package--builtin-versions): Adjust comments.

* lisp/emacs-lisp/loaddefs-gen.el (no-update-autoloads): Moved
here from autoload.el.
* lisp/emacs-lisp/loaddefs-gen.el: Removed now that it's no longer
used.

* lisp/emacs-lisp/package.el
(package-autoload-ensure-default-file): Don't warn about
soon-to-be obsolete functon.
2022-08-04 16:41:39 +02:00
Matt Armstrong
50a192795a Consider built-in packages to be installed
* lisp/emacs-lisp/package.el (package-installed-p): Check for built-in
packages before initialization. (bug#56877).
2022-08-02 12:14:09 +02:00
Philip Kaludercic
f3e7820b48 Extract package-fetch and related functionality
Note that the "package kind" was renamed from "source" to "vc".

* package-vc.el: (package-vc-commit): Copy from package.el
(package-vc-version): Add new function
(package-vc-generate-description-file): Add new function.
(package-vc-unpack): Add new function.
(package-vc-fetch): Copy from package.el
(package-checkout): Add alias for package-vc-fetch
* package.el (package-devel-dir): Remove option.  The checkouts are
stored in package-user-dir
(package-desc): Handle (vc . VERS) version strings
(package-desc-full-name): Return the plain name for vc packages
(package-devel-commit): Move function to package-vc
(package-load-descriptor): Refactor according to other changes
(package-load-all-descriptors): Remove package-devel-dir
(package-unpack): Remove vc package handling
(package-generate-description-file): Remove special handling for vc
packages
(package-install-from-archive): Remove special handling for vc
packages
(package-fetch): Move function to package-vc
(package-desc-status): Use "vc" instead of "source"
(package--remove-hidden): Use "vc" instead of "source"
(package-menu--print-info-simple): Refactor according to other changes
2022-07-31 21:32:38 +02:00
Philip Kaludercic
1180332941 Merge remote-tracking branch 'origin/master' into feature/package+vc 2022-07-31 14:27:28 +02:00
Lars Ingebrigtsen
9c5d8d59cf Fix remaining byte-compile warnings in loaddefs.el
* lisp/progmodes/compile.el (compilation--default-buffer-name):
* lisp/kmacro.el (kmacro-name-last-macro):
* lisp/emacs-lisp/package.el (package--activate-all): Autoload to
avoid byte-compilation warnings when byte-compiling loaddefs.el.
2022-07-31 11:29:52 +02:00
Lars Ingebrigtsen
c5df73941e Fix further package.el loaddefs byte-compile warnings
* lisp/emacs-lisp/package.el (package-directory-list)
(package-quickstart-file): Specify group to avoid warning when
byte-compiling loaddefs.el.
(package-activated-list): Autoload since we're assigning the
variable from a function completely autoloaded.
2022-07-31 11:21:47 +02:00