* lisp/emacs-lisp/package.el (package-dir-info, package-unpack):
Force Dired to return list of packages explicitly marked for
installation. Without the optional argument, Dired will return
the file under the current point if no files are selected.
* lisp/emacs-lisp/cond-star.el (cond*-convert-condition): Bind
unused values to fresh symbols, to avoid the compiler warning
that a symbol starting with an underscore is accessed later on.
This mirrors the behaviour of `if-let*' and family.
* lisp/replace.el (replace--push-stack): Add new args
'next-replacement' and 'match-again' and push them to the stack.
(perform-replace): Restore the previous already calculated values
of 'next-replacement' and 'match-again' from the stack for the
'backup' ('^') key (bug#79811).
* test/lisp/replace-tests.el (query-replace-tests): Add tests.
See https://github.com/editorconfig/editorconfig-emacs/issues/380
* lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file):
Fix regexp to not inadvertently match LF. Remove an O(N²) complexity.
Use `line-number-at-pos`.
* lisp/editorconfig.el (editorconfig--get-coding-system): Don't let
errors propagate.
* java/org/gnu/emacs/EmacsNative.java (setEmacsParams): New arg
UIMODE.
(sendConfigurationChanged): New args DETAIL and UI_MODE.
* java/org/gnu/emacs/EmacsNoninteractive.java (main1): Provide
an undefined UI mode.
* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
uiMode.
(onCreate): Initialize this field at start-up and provide the
same to setEmacsParams.
(onConfigurationChanged): If the UI mode has been altered,
generate a configuration changed event to match.
* src/android.c (android_ui_mode): New variable.
(setEmacsParams): New argument UI_MODE. Initialize the same
from this variable.
* src/androidgui.h (enum android_configuration_changed): New
enum.
(struct android_configuration_changed_event): New field
`DETAIL'. Convert fields providing specifics into a union of
display density information and a UI mode integer.
* src/androidterm.c (handle_one_android_event): Handle both
manners of configuration change events.
(android_term_init): Initialize Vtoolkit_theme from UI mode
provided at start-up.
* src/frame.c (syms_of_frame): Always define Vtoolkit_theme.
Define Qtoolkit_theme_set_functions.
* src/gtkutil.c (xg_update_dark_mode_for_all_displays):
* src/w32term.c (w32_read_socket): Generate special toolkit
theme events, rather than executing hooks directly within the
read_socket callback.
* src/keyboard.c (kbd_buffer_get_event)
<TOOLKIT_THEME_CHANGED_EVENT>: Run Qtoolkit_theme_set_functions
and set Vtoolkit_theme from event->ie.arg.
* src/termhooks.h (enum event_kind): New event
TOOLKIT_THEME_CHANGED_EVENT.
* lisp/vc/diff.el (diff-file-local-copy): Use proper coding-system
when writing a local copy of a non-file visiting buffer.
* lisp/misearch.el (coding-system--for-buffer-diff): New variable.
(multi-file-replace-as-diff): Bind it to 'utf-8-emacs'.
(multi-file-diff-no-select): Use proper coding-system when reading
output of Diff. (Bug#79761)
* lisp/vc/vc-dispatcher.el (auto-revert-buffers): Delete.
(vc-resynch-window): Always call vc-revert-buffer-internal.
Calling auto-revert-buffers will not necessarily revert the
current buffer, but we want it to happen synchronously.
As JD Smith <jdtsmith@gmail.com> said we had 3 paths:
1. macro has `autoload-macro expand` and is already loaded: expand
2. macro has `autoload-macro expand` but is /not/ yet loaded: shortcut
3. macro does not have `autoload-macro expand`: shortcut
and the co-existence of 1 and 2 is a problem because it means
that same macro is sometimes handled one way and sometimes
another, with different results.
Remove number 2 by removing from the shortcut all the remaining
macros that have `autoload-macro expand`.
The immediate effect is that `make autoloads` now (auto)loads three
more files:
[...]
loaddefs-gen: loading file frameset (for cl-defun)
Loading frameset...
INFO Scraping 1547 files for loaddefs...10%
INFO Scraping 1547 files for loaddefs...20%
loaddefs-gen: loading file semantic/analyze (for define-overloadable-function)
Loading semantic/analyze...
INFO Scraping 1547 files for loaddefs...30%
INFO Scraping 1547 files for loaddefs...40%
INFO Scraping 1547 files for loaddefs...50%
INFO Scraping 1547 files for loaddefs...60%
INFO Scraping 1547 files for loaddefs...70%
loaddefs-gen: loading file tramp-adb (for tramp--with-startup)
Loading tramp-adb...
INFO Scraping 1547 files for loaddefs...80%
loaddefs-gen: loading file grep (for define-compilation-mode)
Loading grep...
[...]
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs--defining-macros):
Remove macros that are marked `autoload-macro expand`, even if they are
not predefined.
(loaddefs-generate--make-autoload): Simplify accordingly.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs--defining-macros):
Remove `define-skeleton`, `define-derived-mode`, and
`define-generic-mode` since their `autoload-macro expand` property is
now preloaded.
The predefined macros marked as `autoload-macro expand` can't
get to the shortcul path, so simplify it accordingly.
Mark a few more macros from the shortcut path as `autoload-macro expand`
but don't remove them yet from the shortcut path (need to update
`ldefs-boot.el`).
* lisp/progmodes/compile.el (define-compilation-mode):
* lisp/emacs-lisp/generic.el (define-generic-mode):
* lisp/emacs-lisp/derived.el (define-derived-mode):
* lisp/cedet/mode-local.el (define-overloadable-function):
* lisp/skeleton.el (define-skeleton): Mark as `autoload-macro expand`
so as to make the "shortcut" path in `loaddefs-gen.el` redundant.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs--defining-macros):
Remove the easy-mmode.el macros since they are already marked as
`autoload-macro expand` and they are always defined, so we never check
them against that list.
(loaddefs-generate--make-autoload): Remove handling of the
`easy-mmode.el` macros as well as `defun` and `defmacro` from the
shortcut path since we can never get there with them anyway.
* lisp/textmodes/ispell.el (ispell-add-per-file-word-list): Deal
with `comment-end' in a way that works for comments that don’t
nest.
We proceed as follows: when `comment-end' is non-empty, we only
ever insert one start and one end comment, the first time we add
a local word. This works with both C-style (which don’t nest)
and Rust-style comments (which do).
If we’re using line comments (i.e. comments that only have a
`comment-start'), then continue to insert one on each line.
* test/lisp/textmodes/ispell-tests/ispell-tests.el
(ispell/ispell-add-per-file-word-list/nxml): Adjust test.
Bug#79871
* doc/lispref/frames.texi (Font and Color Parameters): Fix
documentation of values of 'alpha-background'. Suggested by Jacob
S. Gordon <jacob.as.gordon@gmail.com>. (Bug#79861)
* lisp/progmodes/lua-mode.el (lua-process-init-code): Add newline.
(lua-start-process): Use 'process-send-string' to avoid starting
two processes. Flatten 'switches' argument since rest arguments
get added to a list. Replace 'switch-to-buffer' with
'pop-to-buffer' so that the process window behavior can be
customized with 'display-buffer-alist'. Expand docstring and
update it to match the code. (Bug#79853)
* lisp/progmodes/flymake.el (flymake-error-bitmap)
(flymake-warning-bitmap, flymake-note-bitmap): Define new faces.
(flymake-error-fringe, flymake-warning-fringe)
(flymake-note-fringe): Use the new faces by default.
(Bug#79785)
* etc/NEWS: Document the change.
* lisp/startup.el (command-line--load-script): Set 'lexical-binding';
if we delete the first line, insert a new line to preserve line
numbers.
(command-line--eval-script): Set 'lexical-binding'.
* lisp/nxml/nxml-mode.el (nxml-merge-indent-context-type):
Handle 'cdata-section' type to prevent it from returning 'mixed'.
* lisp/nxml/nxml-mode.el (nxml-compute-indent-in-delimited-token):
Preserve existing indentation for CDATA section content.
(bug#79817)
Copyright-paperwork-exempt: yes
* lisp/progmodes/csharp-mode.el (csharp-vsemi-unknown): Rename
to 'csharp-vsemi-unknown-p'. The code was calling a function that
does not exist due to this typo.
(c-class-decl-kwds): Remove duplicated declaration for csharp.
(csharp-ts-mode--font-lock-settings): Remove duplicated declaration
of 'escape-sequence'.
* src/window.c (window_set_parent_and_normal_sizes): When
assigning normal sizes in a combination, take the direction from
its parent's 'horizontal' slot and not from that of the first
window in the combination.
* lisp/vc/vc-git.el (vc-git--file-list-is-rootdir):
Merge into vc-git-command.
(vc-git-command): When operating on the repository root, first
bind default-directory to that root. When operating on the
repository root with 'git checkout', pass "." as FILE-OR-LIST.
Assuming ATTRIBUTE_PURE means that the function must return,
a few more functions that should not be declared with ATTRIBUTE_PURE.
The GCC manual (and even the C23 standard, with [[reproducible]])
is not clear about this, and it’s better to be safe.
* src/bignum.h (mpz_get_d_rounded):
* src/lisp.h (bignum_to_double):
No longer pure, as it does not return if memory is exhausted.
* src/fns.c (Fproper_list_p): No longer pure, as it does not
return if the user quits.
* src/gnutls.c (Fgnutls_errorp): No longer pure, as it does not
return if it runs into an eassert failure in XSYMBOL_WITH_POS via EQ.
* src/lisp.h (bignum_to_intmax, bignum_to_uintmax, bignum_bufsize):
No longer pure, as it does not return if it runs into an
eassert failure in XBIGNUM via xbignum_val.
This merges in changes that were made to Autoconf master
in April 2024. It causes ‘configure’ to prefer the C compiler to
enable C23 features if possible; otherwise, ‘configure’
behaves as before, using C11 if available and C99 if not.
* admin/merge-gnulib (GNULIB_MODULES): Add std-gnu23.
(AVOIDED_MODULES): Add (i.e., start avoiding) std-gnu11.
* m4/std-gnu11.m4: Remove.
* m4/std-gnu23.m4: Add.
* doc/emacs/search.texi (Query Replace): Mention new key 'd'.
* lisp/replace.el (query-replace-help): Mention the key 'd'.
(query-replace-map): Bind the key 'd' to 'diff'.
(perform-replace): When 'def' is equal to 'diff',
call 'multi-file-replace-as-diff' to show the diff buffer
with replacements (bug#79761).
* lisp/misearch.el (multi-file-replace-as-diff): Allow providing
a list of buffers in the argument FILES. Add autoload cookie.
(replace-regexp-as-diff): Provide the current buffer to
'multi-file-replace-as-diff' when 'buffer-file-name' is nil.