Commit graph

9056 commits

Author SHA1 Message Date
Arash Esbati
a95e700698 ; Filter packages available for upgrade via menu bar
* lisp/emacs-lisp/package.el (package-menu-mode-menu): Add entry
to filter packages available for upgrade via menu bar.  (bug#65094)
2023-08-06 09:42:57 +03:00
Jim Porter
1e8322bb26 Fix handling of 'byte-compile-ignore-files' when nil
Before this fix, when 'byte-compile-ignore-files' was nil,
'byte-recompile-directory' would ignore every file (bug#64985).

* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Handle case
when 'byte-compile-ignore-files' is nil.
2023-08-05 10:14:15 -07:00
Jim Porter
8574ef314c Fix loaddef generation with ";;;foo-autoload" cookies in external packages
This caused an issue where package-specific autoload cookies weren't
being correctly recognized, so they got dumped into the package's main
"<pkg>-autoloads.el" file, instead of "<pkg>-loaddefs.el" as they
should (bug#65023).

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Save match data when checking syntax.
2023-08-04 11:01:31 -07:00
Jim Porter
da5e05a50e Fix handling of ".elpaignore" file when compiling packages
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Treat
'byte-compile-ignore-files' as a list of regexps per its docstring
(bug#64985).
2023-08-01 18:14:35 -07:00
Eli Zaretskii
0c29f53ab8 Fix 'string-pixel-width' under 'line-prefix'
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Disable
'line-prefix' and 'wrap-prefix' to avoid their effect on the
calculated string width.  (Bug#64971)
2023-07-31 21:50:45 +03:00
Mattias Engdegård
2b8796eea1 Fix rx wrong-code bug: ranges starting with ^
(rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
Change it so that we get "[_-a^]" instead.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
`^` occurring first in a non-negated character alternative.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.

(cherry picked from commit 5f5d668ac7)
2023-07-30 18:12:19 +02:00
Spencer Baugh
17073af84d ; Improve robustness of package-report-bug
* lisp/emacs-lisp/package.el (package-report-bug): Do not assume that
every entry in 'custom-current-group-alist' has a non-nil entry for a
filename.

It is possible for a group to not be associated with any file, e.g. when
a 'defgroup' form is evaluated using 'eval-expression'.  (bug#64543)
2023-07-16 00:27:40 +02:00
Eli Zaretskii
0165b50b0f ; * lisp/emacs-lisp/lisp.el (raise-sexp): Fix typo in doc string. 2023-07-12 15:19:10 +03:00
Robert Pluim
c3fefb2b3a Improve natnump shortdoc
* lisp/emacs-lisp/shortdoc.el (number): Make it clear that zero
satisfies 'natnump'.  Move 'natnump' next to 'cl-plusp' to highlight
the difference between them.
2023-07-04 17:44:43 +02:00
Eli Zaretskii
fc6099bf04 ; Improve documentation of text-property-search-* functions
* doc/lispref/text.texi (Property Search): Improve wording and markup.

* lisp/emacs-lisp/text-property-search.el (text-property-search-forward)
(text-property-search-backward): Doc fixes.  (Bug#64367)
2023-07-01 12:28:33 +03:00
Daniel Semyonov
4df510c7a7 Fix VC package build when doc file isn't in a subdir
* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Expand 'file' before attempting to get its directory.  (Bug#64242)
2023-06-25 23:33:24 +02:00
Mattias Engdegård
d0147ff9e5 * lisp/emacs-lisp/shortdoc.el: More and better substring examples.
Suggested by Juri Linkov.
2023-06-24 12:27:08 +02:00
Eli Zaretskii
7637e361d3 Don't truncate filenames with "emacs.el" in them
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol):
Avoid false positives when looking for "emacs.el" matches the
likes of "emacs.elpa".  (Bug#64143)
2023-06-20 16:35:09 +03:00
Eli Zaretskii
b3f11e94fa Fix documentation of :predicate in 'define-globalized-minor-mode'
* doc/lispref/modes.texi (Defining Minor Modes):
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Document that :predicate creates a customizable user option.
(Bug#64048)
2023-06-18 08:50:54 +03:00
Eli Zaretskii
90eadc3e23 Revert "* package.el (package--get-activatable-pkg): Prefer source packages"
This reverts commit fb87d5008e.
It caused problems when new versions of packages are installed
without deleting old versions.  (Bug#63757)
2023-06-08 12:23:11 +03:00
Andrea Corallo
65f355ea0a ; Update my mail address
* lisp/emacs-lisp/comp-cstr.el: Update author mail.
* lisp/emacs-lisp/comp.el: Likewise.
* src/comp.c: Likewise.
* test/lisp/emacs-lisp/comp-cstr-tests.el: Likewise.
* test/src/comp-resources/comp-test-funcs-dyn.el: Likewise.
* test/src/comp-resources/comp-test-funcs.el: Likewise.
* test/src/comp-resources/comp-test-pure.el: Likewise.
* test/src/comp-tests.el: Likewise.
2023-06-08 11:04:10 +02:00
Andrea Corallo
bcc222251e Fix `emacs-lisp-native-compile-and-load' for C-h f (bug#58314)
* lisp/emacs-lisp/comp.el (comp-write-bytecode-file): New function
spilling code from `batch-byte+native-compile'.
(batch-byte+native-compile): Make use of.
* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Produce the elc file and ask
to have it loaded.
2023-06-06 12:21:43 +02:00
Philip Kaludercic
fa8135f891 Revert changes to the order in which package descs are loaded
* lisp/emacs-lisp/package.el (package-load-all-descriptors):  Remove
NOSORT argument to 'directory-files', reverting back to the behaviour
as of Emacs 28.  (Bug#63757)
2023-06-04 15:21:13 +02:00
Philip Kaludercic
17c7915ab9 ; Fix 'package-install-upgrade-built-in' check for package menu
* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Use
correct check to verify if a built-in packages in the package menu can
be upgraded or not.

This change improves upon a faulty assumption from
ba2c76fa2b.  (Bug#63587)
2023-05-31 23:54:29 +02:00
Eli Zaretskii
afc1f32935 Allow to disable the DWIMish behavior of 'x' in package menu
* lisp/emacs-lisp/package.el
(package-menu-use-current-if-no-marks): New defcustom.
(package-menu-execute): Use it.  (Bug#62563)

* etc/NEWS: Announce the new option.
2023-05-29 16:44:48 +03:00
Stefan Monnier
0abb79ca09 Avoid duplicates when adding package dirs to load-path
Do not merge to master, we're going to delete this code there.

* lisp/emacs-lisp/package.el (package-activate-1): Check if the path
we're about to add is already in 'load-path', since package autoload
files have been updating 'load-path' for a decade.
2023-05-23 14:12:21 +02:00
Robert Pluim
6f6071c526 Avoid duplicate load-path entry when generating package autoloads
'file-name-directory' produces a path ending in '/', so that needs to be
run through 'directory-file-name' to avoid duplicate entries in
'load-path'.  (Bug#63625)

* lisp/emacs-lisp/package.el (package-generate-autoloads): Call
'directory-file-name' on the directory of 'load-file-name'.
2023-05-23 14:12:21 +02:00
Eli Zaretskii
3bc5efb87e ; * lisp/emacs-lisp/benchmark.el (benchmark-progn): Fix declare form. 2023-05-18 17:20:36 +03:00
Eli Zaretskii
af3b0dc53f Improve documentation of package-menu commands
* doc/emacs/package.texi (Package Menu): Document that some
package-menu filters accept lists of values interactively.

* lisp/emacs-lisp/package.el (package-menu-execute)
(package-menu-hide-package, package-menu-describe-package)
(package-menu-mark-delete, package-menu-mark-install)
(package-menu-mark-unmark, package-menu-backup-unmark)
(package-menu-quick-help, package-menu-get-status)
(package-menu--find-upgrades, package-menu-mark-upgrades)
(package-menu-filter-by-archive)
(package-menu-filter-by-description)
(package-menu-filter-by-keyword)
(package-menu-filter-by-name-or-description)
(package-menu-filter-by-name, package-menu-filter-by-status)
(package-menu-filter-by-version, package-menu-filter-marked)
(package-menu-describe-package): Doc fixes.
2023-05-18 09:41:59 +03:00
Andrea Corallo
1e57b2b4c7 * Account for `byte-compile-warnings' during native compilation (bug#63302).
* lisp/emacs-lisp/comp.el (comp-final, comp-run-async-workers):
Forward `byte-compile-warnings' to child processes.
2023-05-17 15:13:17 +02:00
Philip Kaludercic
b5bfd808c6 Avoid duplicate VC packages in 'package-selected-packages'
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Check if
'package-selected-packages' already contains the package name.
(bug#63338)
2023-05-16 20:47:34 +02:00
Joseph Turner
1e6a759436 Fix building of VC package manuals with relative includes
* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Invoke makeinfo with -I to ensure the package directory is always
consulted for @include statements.  (Bug#63337)
2023-05-13 19:16:57 +02:00
Philip Kaludercic
ba2c76fa2b Ensure that package menu respects 'package-install-upgrade-built-in'
* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Check if
built-in packages can be upgraded if
'package-install-upgrade-built-in' is non-nil.
2023-05-12 09:41:55 +02:00
Philip Kaludercic
6fa9332e7c Ensure that EXTRA-DATA are always written when generating autoloads
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Handle
edge-case where no autoloads are found.  (Bug#63260)
2023-05-12 09:41:55 +02:00
Nicholas Vollmer
e920dd2b6f define-minor-mode: sanitize mode function messages
* emacs-lisp/easy-mmode.el (define-minor-mode): Ensure mode's
pretty name is not interprted as a message formatting string,
e.g., if the mode name contains a '%'.  (Bug#63343)
2023-05-07 16:37:24 +03:00
Philip Kaludercic
dfde902f3b ; Expand 'package-vc-install' documentation
* lisp/emacs-lisp/package-vc.el (package-vc-install): Go into further
detail on the handling of the REV argument.  (Bug#60418)
2023-05-06 20:51:49 +02:00
Eli Zaretskii
97b818a4fb Fix doc strings of 'mark-sexp' and 'mark-word'
* lisp/emacs-lisp/lisp.el (mark-sexp):
* lisp/simple.el (mark-word): Clarify the doc strings in various
usage cases.  (Bug#62892)
2023-05-06 11:47:31 +03:00
Dmitry Gutov
79a886ba36 (package-upgrade): Don't remove the package from 'package-selected-packages'
* lisp/emacs-lisp/package.el (package-upgrade):
Don't remove the package from 'package-selected-packages', fixing
the problem described in https://debbugs.gnu.org/62720#718.
2023-05-06 03:32:27 +03:00
Robert Pluim
94e984e670 Make loaddefs-generate slightly more tolerant
There are packages in the wild, such as vlf-20191126.2250, which have
entries that are not terminated by three ';', but by two.  Tolerate
such entries.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Search for two
';' as a delimiter, not three.  (Bug#63236)
2023-05-04 16:03:13 +02:00
Philip Kaludercic
2901a3443c Prevent unnecessary modifications of 'package-vc-selected-packages'
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Handle the
structure of correctly, not as an alist but a list of alists.
(package-vc--archive-spec-alist, package-vc--archive-spec-alists,
package-vc--desc->spec, package-vc--read-archive-data,
package-vc--download-and-read-archives, package-vc--unpack): Rename
'package-vc--archive-spec-alist' to 'package-vc--archive-spec-alists'.
2023-05-04 10:06:32 +02:00
Thuna
57562c3fd0 Recognize defstruct slot names in various eieio functions
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Set
each slot's name's 'slot-name' property so that
'eieio--known-slot-name-p' can recognize them.  (Bug#62959)

Copyright-paperwork-exempt: yes
2023-05-03 14:44:59 +03:00
Philip Kaludercic
dd21003878 Prevent generating empty autoload files
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Remove
optimisation that would mistakenly discard old loaddefs in case a file
was not modified by EXTRA-DATA is non-nil.  (Bug#62734)
2023-04-30 18:42:58 +02:00
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