* lisp/eshell/esh-worker.el (eshell-map-lines-worker)
(eshell-apply-lines-worker): New structs.
(eshell-map-lines-worker--apply): New generic function.
(eshell-output-object-to-target, eshell-close-target): New methods.
(eshell/map-lines, eshell/apply-lines): New functions.
* test/lisp/eshell/esh-worker-tests.el (eshell-test-line-number): New
defvar...
(eshell-test-number): ... use it in this new function.
(esh-worker-test/map-lines/eshell-one-line)
(esh-worker-test/map-lines/eshell-multiple-lines)
(esh-worker-test/map-lines/eshell-multiple-batches)
(esh-worker-test/map-lines/external-one-line)
(esh-worker-test/map-lines/external-multiple-lines)
(esh-worker-test/map-lines/numbers)
(esh-worker-test/map-lines/numeric-conversion)
(esh-worker-test/apply-lines/eshell-one-line)
(esh-worker-test/apply-lines/eshell-multiple-lines)
(esh-worker-test/apply-lines/external-one-line)
(esh-worker-test/apply-lines/external-multiple-lines)
(esh-worker-test/apply-lines/numbers)
(esh-worker-test/apply-lines/numeric-conversion): New tests.
* lisp/eshell/esh-worker.el:
* test/lisp/eshell/esh-worker-tests.el: New files.
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Call 'eshell-get-pipe'
when the command is a pipe target.
* lisp/eshell/em-basic.el (eshell/echo): Mark as producing literal
results.
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Don't try to call a
literal lambda.
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/literal-lambda): New
test.
* src/cmds.c (internal_self_insert): If the autofill function changed
the newline character we inserted, don't attempt to restore point.
* test/src/cmds-tests.el (self-insert-nonascii-autofill): New.
* src/casefiddle.c (do_casify_natnum): Extend range a little, to cover
character events with all modifier flags set.
* test/src/casefiddle-tests.el (casefiddle-allflags): New test.
This would (rarely) result in composition properties being shared
across the concatenation of two copies of a string.
* src/editfns.c (styled_format): Include the first argument in the
range.
* test/src/editfns-tests.el (editfns-tests--format-composition-property):
New.
* src/treesit.c (treesit_check_position): Return the validated
value.
(Ftreesit_node_first_child_for_pos):
(Ftreesit_node_descendant_for_range):
(Ftreesit_query_capture):
(Ftreesit__linecol_at): Fold calls to fix_position into
treesit_check_position in treesit.c.
This pacifies GCC 16.1.1 x86-64 -Warray-bounds when compiling with
-fsanitize=address. It’s also cleaner on more-typical platforms.
* src/termhooks.h (EVENT_INIT): Define via a compound literal
rather than via a memset plus an assignment. This evaluates the
argument lvalue only once, and is more likely to catch type errors.
* src/sfnt.c (memory_full_up) [TEST]: New static function.
(xmalloc, xcalloc, xrealloc): Use it instead of aborting.
(eassert) [TEST]: Remove; no longer needed.
(xaddmalloc, xaddrealloc): New static convenience functions.
(sfnt_read_cmap_format_12, sfnt_read_loca_table_short)
(sfnt_read_loca_table_long, sfnt_read_glyf_table)
(sfnt_read_simple_glyph, sfnt_read_compound_glyph)
(sfnt_read_glyph, sfnt_build_append, sfnt_build_outline_edges)
(sfnt_raster_glyph_outline, sfnt_build_outline_fedges)
(sfnt_raster_glyph_outline_exact, sfnt_read_hmtx_table)
(sfnt_read_name_table, sfnt_read_meta_table)
(sfnt_read_ttc_header, sfnt_read_fpgm_table)
(sfnt_read_prep_table, sfnt_create_uvs_context)
(sfnt_read_gvar_table, sfnt_read_packed_deltas)
(sfnt_vary_simple_glyph, sfnt_vary_compound_glyph):
Use the new functions to test for size overflow more reliably.
Use a cleaner way to decide whether a pointer addresses
the heap not the stack and thus needs freeing.
Fix a few more unlikely overflows.
(sfnt_read_cmap_format_12): The recently-added eassert is no
longer needed, so remove it.
(sfnt_read_simple_glyph): Initialize glyph->simple early
to simplify later code, as is done in similar functions.
Complicate size test to avoid potential unsigned overflow.
Even the earliest Android had plain ‘long long’,
so use that instead of doing it by hand.
* src/sfnt.c (struct sfnt_large_integer, sfnt_multiply_divide_1)
(sfnt_multiply_divide_2, sfnt_large_integer_add)
(sfnt_multiply_divide_round) [!INT64_MAX]: Remove.
(sfnt_multiply_divide, sfnt_multiply_divide_rounded)
(sfnt_mul_fixed, sfnt_mul_fixed_round, sfnt_div_fixed)
(sfnt_div_f26dot6, sfnt_mul_f26dot6, sfnt_mul_f26dot6_round)
(sfnt_mul_f2dot14, sfnt_dot_fix_14): Simplify by using long long.
* src/xselect.c (selection_data_for_offset):
Offset is size_t, not long, since that’s what caller passes.
(selection_data_size): Truncate large selection sizes to a value
that is more likely to work without involving undefined behavior.
Do not exceed X_ULONG_MAX which is all X can handle, or
PTRDIFF_MAX which can confuse underlying code.
(x_start_selection_transfer): Invoke selection_data_size just once.
* src/alloc.c (xcalloc): New function.
* src/dispnew.c (save_current_matrix):
* src/fns.c (Finternal__hash_table_histogram):
* src/nsfns.m (Fns_display_monitor_attributes_list):
* src/pgtkfns.c (Fpgtk_display_monitor_attributes_list):
* src/pgtkselect.c (pgtk_own_selection):
* src/profiler.c (make_log):
* src/sfnt.c (sfnt_poly_edges_exact):
* src/xfns.c (x_get_monitor_attributes_xinerama)
(x_get_monitor_attributes_xrandr, Fx_display_monitor_attributes_list):
Use it instead of multiplying by hand, conceivably with overflow.
* src/profiler.c (make_log):
Check for overflow in internal size calculations.
Use xnmalloc instead of multiply + xmalloc.
* src/sfnt.c (xzalloc) [TEST]: Remove, replacing with ...
(xicalloc) [TEST]: ... this new function. All callers changed.
(eassert) [TEST]: New macro.
* src/treesit.c (treesit_calloc_wrapper): Remove, replacing its
use with xcalloc.
* exec/exec.c (format_pid): Simplify. No need for a local array.
(exec_0): Shrink local buffer.
If names are too long, fail instead of silently truncating them.
Be cautious in case symlink is zero length (shouldn’t be possible
in Android, but it’s easy to be safe).
* src/xterm.c (x_dnd_begin_drag_and_drop): The n_ask_actions arg
is an int, not a size_t, as XChangeProperty supports only int and
our caller passes an int.
* src/json.c (json_out_grow_buf)
(json_make_object_workspace_for_slow_path)
(json_byte_workspace_put_slow_path):
Use xpalloc rather than doing it by hand.
* src/json.c (json_out_grow_buf):
Change arg from needed bytes to minimum increment of bytes.
Caller changed.
* src/alloc.c (STRING_BYTES_MAX): Also don’t allow sizes to exceed
PTRDIFF_MAX in internal calculations when calling malloc, as those
are problematic even if the final number of bytes does not exceed
PTRDIFF_MAX.
* src/alloc.c (memory_full_up): New function. Replace all callers
of memory_full (SIZE_MAX) with callers to this function.
This simplifies callers and should make future changes easier.
It also saves a whopping 296 bytes in executable size
with gcc 16.1.1 20260515 (Red Hat 16.1.1-2) x86-64.
4f13f52a3a * build-aux/git-hooks/commit-msg: Replace Markdown-style ...
dd42133315 vc-test--rename-file: Disable part of test for SCCS
eb653865c3 markdown-ts-mode: Don't enable unconditionally by default
# Conflicts:
# etc/NEWS
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode-maybe):
New function.
(auto-mode-alist): Bind ".md", ".markdown", and ".mdx" to
'markdown-ts-mode-maybe' instead of 'markdown-ts-mode'.
* etc/NEWS: Update the 'markdown-ts-mode' entry.
This is okay with regard to bootstrapping because vc-hooks.el is
loaded after loaddefs.el in loadup.el.
* lisp/emacs-lisp/cond-star.el (cl-lib): Don't require, so we
can use cond* in preloaded files.
(cond*-convert-condition): Replace calls to cl-assert.
* lisp/vc/vc-hooks.el (vc-refresh-state): Use cond*.
7a17f97baa Prettify special glyphs
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather tha...
70b79b3ed8 Rename `icalendar-recur' type and related functions
3d2bb233f2 ; Minor Tramp changes
f6281d757d ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'.
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
d6f7b2d99b Save/restore old_buffer slot via window configurations (B...
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
7df8604ea6 ; Improve documentation of lazy-highlight in search and r...
2936b36164 Fix "assertion 'GTK_IS_WINDOW (window)' failed"
98348a0bdc [Xt] Fix child frame resizing glitch
13b29eebc1 Eglot: use standard face for completion annotations (bug#...
# Conflicts:
# etc/NEWS
* lisp/disp-table.el (prettify-special-glyphs-mode): New mode to
display nicer special glyphs.
(special-glyphs): New face for displaying special glyphs when
the minor mode is active.
(prettify-special-glyphs-saved-truncation)
(prettify-special-glyphs-saved-continuation): Internal variables
to save previous special glyphs.
* etc/NEWS: Announce the change. (Bug#80628)
More context in Bug#80786 and:
https://lists.gnu.org/archive/html/emacs-orgmode/2026-03/msg00286.html
`icalendar-recur' as a type name for RRULE values was confusing and made
the accessors for this type difficult to discover, because `icalendar-recur-'
is also used as a prefix in icalendar-recur.el. This change renames the
`icalendar-recur' type to `icalendar-rrule-value' and renames the
accessor functions for these values appropriately.
* lisp/calendar/icalendar-parser.el: Rename symbols as follows:
(icalendar-recur): `icalendar-rrule-value'
(icalendar-read-recur-rule-part): `icalendar-read-rrule-part'
(icalendar-print-recur-rule-part): `icalendar-print-rrule-part'
(icalendar-recur-rule-part): `icalendar-rrule-part'
(icalendar-read-recur): `icalendar-read-rrule-value'
(icalendar-print-recur): `icalendar-print-rrule-value'
(icalendar--recur-value-types): `icalendar--rrule-value-types'
(icalendar-recur-value-p): `icalendar-rrule-value-p'
(icalendar-recur-freq): `icalendar-rrule-freq'
(icalendar-recur-interval-size): `icalendar-rrule-interval-size'
(icalendar-recur-until): `icalendar-rrule-until'
(icalendar-recur-count): `icalendar-rrule-count'
(icalendar-recur-weekstart): `icalendar-rrule-weekstart'
(icalendar-recur-by*): `icalendar-rrule-by*'.
(icalendar-rrule):
(icalendar-index-insert):
(icalendar-index-get): Update references.
* lisp/calendar/icalendar-recur.el (icalendar-recur-find-interval):
(icalendar-recur-nth-interval):
(icalendar-recur-next-interval):
(icalendar-recur-previous-interval):
(icalendar-recur-refine-from-clauses):
(icalendar-recur-recurrences-in-interval):
(icalendar-recur-recurrences-in-window):
(icalendar-recur-recurrences-to-count):
(icalendar-recur-tz-observance-on): Update references.
* lisp/calendar/diary-icalendar.el: Update references.
* lisp/calendar/icalendar-shortdoc.el (icalendar): Update shortdoc examples.
* lisp/gnus/gnus-icalendar.el: Update references.
* test/lisp/calendar/diary-icalendar-tests.el:
* test/lisp/calendar/icalendar-parser-tests.el:
* test/lisp/calendar/icalendar-recur-tests.el: Update references in tests.