Commit graph

88171 commits

Author SHA1 Message Date
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
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
Stefan Monnier
3fa4cca3d2 * lisp/url/url-util.el (url-insert-entities-in-string): Simplify 2022-10-30 09:40:06 -04:00
Stefan Monnier
311c95fd67 dom-print: Fix missing entities quoting
Also use `?\s` for the space character.

* lisp/dom.el (dom-print): Properly quote special characters to avoid
generating invalid HTML/XML.
(dom-tag, dom-attributes, dom-children, dom-node)
(dom-add-child-before): Simplify.
(dom-set-attribute): Add at beginning rather than at end (slightly
more efficient and less destructive).
2022-10-30 09:40:06 -04:00
Stefan Kangas
2fa8f1b77a elide-head: Make trailing "/" in URL optional
* lisp/elide-head.el (elide-head-headers-to-hide): Make trailing
"/" in the gnu.org URL optional for the GPL.
* test/lisp/elide-head-tests.el
(elide-head--test-headers-to-hide/gpl3-5): New test.
2022-10-30 14:32:24 +01:00
Damien Cassou
b1fa7974bb Make previous-buffer and next-buffer repeatable
* lisp/bindings.el (buffer-navigation-repeat-map): Add new map.
* lisp/bindings.el (previous-buffer, next-buffer): Mark as
repeatable.  (Bug#58800)
2022-10-30 14:14:13 +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
Damien Cassou
0922e755d2 Make winner key sequences repeatable in repeat-mode
* lisp/winner.el (winner-repeat-map): New variable.
(winner-undo, winner-redo): Put 'repeat-map' property with
'winner-repeat-map'.  (Bug#58799)
2022-10-30 13:19:05 +01:00
Stefan Kangas
16686bdb86 Prefer defvar-keymap in etags.el
* lisp/progmodes/etags.el (select-tags-table-mode-map): Prefer
defvar-keymap.
2022-10-30 13:16:03 +01:00
Eli Zaretskii
d4dffae72c ; Change parent language-environment of Kharoshthi
* lisp/language/misc-lang.el ("Kharoshthi"): Change its parent to
"Indian".  (Bug#58376)
* lisp/international/mule-cmds.el (set-language-info-alist): Fix
indentation.
2022-10-30 13:16:30 +02:00
Visuwesh
fa249fd824 Fix set-language-info-alist when multiple PARENTS are given
* lisp/international/mule-cmds.el (set-language-info-setup-keymap):
Function factored out from...
(set-language-info-alist): ...here.  Do not mess up the keymaps when
multiple parents are given in PARENTS.  (Bug#58376)
2022-10-30 13:09:14 +02:00
Juri Linkov
b489ca5070 * lisp/tab-bar.el: Minibuffer follows selected tabs (bug#58728)
(tab-bar-select-tab): Set set-window-configuration
arg DONT-SET-MINIWINDOW to t.  Reselect the previously active minibuffer
and unselect unnecessarily selected minibuffer.
(tab-bar-history-back, tab-bar-history-forward): Set set-window-configuration
arg DONT-SET-MINIWINDOW to t.
2022-10-30 09:33:38 +02:00
Basil L. Contovounesios
1d62c96423 ; Silence warning in last hierarchy.el change. 2022-10-30 00:44:44 +03:00
Eli Zaretskii
44f1b1edcf ; * lisp/dired.el (dired--make-directory-clickable): Fix typo. 2022-10-29 19:52:48 +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
Stefan Kangas
81d7827f34 Prefer defvar-keymap in ps-mode.el
* lisp/progmodes/ps-mode.el (ps-mode-map, ps-run-mode-map): Prefer
defvar-keymap.
2022-10-29 17:08:51 +02:00
Stefan Kangas
5686df3d21 ; Remove redundant declares of w3m-minor-mode-map
* lisp/gnus/gnus-art.el (w3m-minor-mode-map):
* lisp/net/newst-backend.el (w3m-minor-mode-map): Don't declare.
2022-10-29 17:06:16 +02: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
Eli Zaretskii
174dd06464 Make Dired header clickable on non-Posix systems as well
* lisp/dired.el (dired--make-directory-clickable): Support
MS-Windows and MS-DOS absolute directory names with drive letters
and UNCs.  (Bug#21973)
2022-10-29 16:16:06 +03:00
Eli Zaretskii
e9bdf3d4bd Display the Dired buffer as unmodified initially
* lisp/dired.el (dired-readin): Make sure a newly-created Dired
buffer is shown as unmodified.  (Bug#58863)
2022-10-29 16:02:35 +03:00
Alan Mackenzie
dfde4fc82b c-get-fontification-context: Refine the last non-default arm of the cond
This fixes bug #58772.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Make the function
return (decl . nil) when MATCH-POS is in the second paren list of something
like DEFUN (..) (..).  Tidy up untidy code with save-excursion's for greater
accuracy.  Set a c-type text property value c-decl-arg-start to speed up
future calls.  Reindent the entire function.
2022-10-29 10:04:37 +00:00
Stefan Kangas
ce52746444 Prefer defvar-keymap in help.el
* lisp/help.el (help-key): New function.
(help-map): Prefer defvar-keymap.
2022-10-29 08:21:59 +02:00
Stefan Kangas
3b0296c8b0 Prefer defvar-keymap in page-ext.el
* lisp/textmodes/page-ext.el (pages--ctl-x-ctl-p-map)
(pages-directory-mode-map): Prefer defvar-keymap.
2022-10-29 04:02:20 +02:00
Stefan Kangas
aa23bf987a ; Minor cleanups in make-mode.el
* lisp/progmodes/make-mode.el
(makefile-query-one-target-method-function)
(makefile-insert-macro, makefile-insert-target)
(makefile-insert-target-ref, makefile-backslash-region)
(makefile-browser-next-line, makefile-browser-previous-line)
(makefile-remember-target): Minor cleanups.
2022-10-29 03:42:46 +02:00
Stefan Kangas
61226605f6 ; Fix sit-for calling convention in zone.el
* lisp/play/zone.el (zone-pgm-2nd-putz-with-case)
(zone-pgm-putz-with-case): Don't use obsolete calling convention for
'sit-for'.
2022-10-28 22:34:52 +02:00
Stefan Kangas
cabb496d6e Remove redundant requires from make-mode.el
* lisp/progmodes/make-mode.el (imenu, dabbrev, add-log): Remove
redundant requires.
2022-10-28 22:30:31 +02:00
Stefan Kangas
44d2d23ffe Use new sit-for calling convention in zone.el
* lisp/play/zone.el (zone-exploding-remove): Don't use obsolete
calling convention for 'sit-for'.
2022-10-28 22:23:08 +02:00
Stefan Kangas
4fc5670a72 Minor doc fixes in make-mode.el
* lisp/progmodes/make-mode.el:
(makefile-insert-macro, makefile-pickup-everything)
(makefile-backslash-region): Minor doc fixes.
(makefile-browse): Use substitute-command-keys.
2022-10-28 22:23:08 +02:00
Stefan Kangas
bf0e4d1b03 Prefer defvar-keymap in make-mode.el
* lisp/progmodes/make-mode.el (makefile-mode-map)
(makefile-browser-map): Prefer defvar-keymap.
2022-10-28 22:23:08 +02:00
Stefan Kangas
6f42782a57 Prefer make-temp-name in make-mode.el
* lisp/progmodes/make-mode.el
(makefile-generate-temporary-filename): Make obsolete in favor of
'make-temp-name'.  Simplify.
(makefile-save-temporary): Don't use above obsolete function.
2022-10-28 22:23:08 +02:00
Stefan Kangas
dee3d93e73 Ensure temp file is deleted in makefile overview
* lisp/progmodes/make-mode.el (makefile-create-up-to-date-overview):
Ensure temp file is always deleted.
2022-10-28 22:23:08 +02:00
Stefan Kangas
943f95e03c Merge from origin/emacs-28
510020d30d ; Improve doc strings in whitespace.el

# Conflicts:
#	lisp/whitespace.el
2022-10-28 21:51:44 +02: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
Alan Mackenzie
622724e95d CC Mode: Fontify cast types without adding them to c-found-types
* lisp/progmodes/cc-engine.el (c-forward-type): Test for the special new
value `just-one' of c-promote-possible-types, and if found, fontify the type,
but don't add it to c-found-types.
(c-forward-decl-or-cast-1): Add the new &optional parameter inside-macro.
Whilst checking for a cast construct, analyze the text following the closing
paren more rigorously.
Check for, and allow, the closing paren of a macro arglist before the putative
cast construct.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): In the lambda
function, pass the parameter inside-macro to c-forward-decl-or-cast-1.

* lisp/progmodes/cc-langs.el (c-primary-expr-regexp-details): New
c-lang-defvar which calculates `c-primary-expr-regexp' and three match
numbers for various sub-expressions in the regexp.
(c-primary-expr-regexp): Now extracted from `c-primary-expr-regexp-details'.
(c-per-++---match, c-per-&*+--match, c-per-\(-match): New
c-lang-defconsts/vars extracted from `c-primary-expr-regexp-details'.
2022-10-28 17:50:33 +00: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
Jonas Bernoulli
de5a3fa1e5 * lisp/transient.el: Update to package version v0.3.7-173-g81b29ca 2022-10-28 16:27:25 +02: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
Alan Mackenzie
f9ed80f9d0 CC Mode: Fix wrong fontification of enum foo bar; in Objective C Mode
This fixes bug #58795 and bug #58796.

* lisp/progmodes/cc-langs.el (c-type-prefix-kwds): Add the missing entry for
objc.
2022-10-28 12:15:18 +00:00
Eli Zaretskii
e953490603 ; * lisp/progmodes/gud.el (gud-gdb): Doc fix. (Bug#58826) 2022-10-28 09:23:12 +03:00