Commit graph

182457 commits

Author SHA1 Message Date
c1f9d62b27 Metal: inset glyph-string background fill by the box line width
Match ns_maybe_dumpglyphs_background: fill the background from
s->y + box_line_width with height s->height - 2*box_line_width instead of
the full cell height. For a boxed face (e.g. the selected tab-bar tab,
or a boxed mode-line) this leaves the box edge rows untouched, so the
relief drawn afterwards is not first overwritten with the background and
then redrawn on top. For unboxed faces box_line_width is 0, so it is
identical to the previous full-height fill (AE vs NS unchanged at 0.88%).
2026-06-04 08:54:03 +02:00
98720f3d1c Metal: neutral light fallbacks instead of baked-in Nord colors (F4)
The real draw path used Nord theme colors (0x2E3440 bg, 0xECEFF4 fg) as
fallbacks for when the frame or face is null. Those paths are effectively
unreachable, but baking a dark theme into a backend that mirrors the NS
default light theme is wrong if ever hit. Use neutral white bg / black fg
instead. The MtlView test window and the offscreen PNG render keep their
Nord palette (out of the real redisplay path), per TODO F4.
2026-06-04 08:54:03 +02:00
d91a6dc02b Metal: coalesce immediate-draw presents to stop mouse-face hover flicker
Mouse-face highlight (note_mouse_highlight -> show_mouse_face) draws
outside the update_begin/end cycle. Presenting on every immediate
draw_glyph_string flickered: one mouse move runs clear_mouse_face +
show_mouse_face, several draws, each flashing the intermediate
(un-highlighted) state.

Each immediate draw now commits to the static texture but defers the
on-screen present (endFramePresent:NO sets needsPresent); flush_display
and update_begin present once, showing the whole clear+redraw sequence
in a single composite. This keeps the pipeline clean (no encoder left
open between draws) while removing the flicker.

Verified: hover highlight still applies (gamma 168 vs 179 inactive),
AE vs NS unchanged at 0.88%.
2026-06-04 08:54:03 +02:00
47aeb064a1 Metal: correct strike-through position and add overline (F2)
Strike-through used s->ybase - s->height/3, which sits too high and
mis-centers when the row is taller than the string. Match NS: center a
1px line on the first glyph's body (glyph_y + (glyph_height-1)/2). Add
the overline (1px at the top of the string), which was missing.

Verified vs NS: both lines now land at the same place relative to the
glyphs.
2026-06-04 08:54:03 +02:00
4c1798c29a Metal: compute the underline position from font metrics (F2)
The underline was drawn at s->ybase + s->underline_position, but
underline_position/underline_thickness are filled in by each backend
(the NS backend computes them in ns_draw_text_decoration) and were left
at 0 here, so the line landed on the baseline and cut through the bottom
of the glyphs.

Add mtl_underline_metrics, mirroring the NS computation: position from
font->underline_position (or descent/2, or the descent line per the
face), thickness from the font (min 1), clamped to stay inside the cell,
and matching a previous underlined run for continuity. Handle single,
double (second line above), and colored underlines; wave falls back to a
straight line at the same position for now.

Verified vs NS: the underline is now a full-width bar just below the
glyph body instead of through it; AE unchanged at ~0.88%.
2026-06-04 08:54:03 +02:00
71d289939a Metal: render immediate draws (mouse-face highlight) outside the frame cycle (F1)
note_mouse_highlight -> show_mouse_face draws the mouse-face highlight by
calling draw_glyph_string directly, outside the update_begin/end cycle, so
no Metal render encoder was active and mtl_draw_glyph_string returned early:
the highlight never appeared (the NS backend draws immediately via lockFocus).

Split the drawing body into mtl_draw_glyph_string_impl and make the public
mtl_draw_glyph_string open a self-contained frame (beginFrame uses LOAD, so
the static texture is preserved), draw, then endFrame to present, whenever it
is called with no encoder active. The same path also restores normal text
when the mouse leaves (clear_mouse_face).

Verified by hovering a mouse-face region with cliclick: the region row
background switches to the highlight face (209,210,210) vs (244,244,244) for
a normal row, with +6 draw_glyph_string calls and no-fd == 0; AE vs NS
unchanged at ~0.88%.
2026-06-04 08:54:03 +02:00
e4ece37534 Metal: clear the scroll bar gutter in the static texture (D1)
The NS scroll bars are transparent NSScroller overlays, so the gutter
behind them shows whatever the static texture holds. ns_set_*_scroll_bar
clears that area via ns_clear_frame_area, which targets CoreGraphics and
not the Metal texture, so on a window split the old text in the new
gutter column bled through until the next full redraw.

Wrap the vertical/horizontal scroll bar hooks: they run in redisplay's
layout phase (before update_begin, no render encoder yet), so queue the
scroll bar area rect and flush it to the frame background at the start of
the next frame, then delegate to NS to position the scroller.

Verified with a split probe: gutter text density dropped 0.167 -> 0.011
while the text columns stayed at 0.17; AE vs NS unchanged at ~0.88%.
2026-06-04 08:54:03 +02:00
d1cd7b2405 Metal: bake the glyph atlas at physical resolution (Retina/HiDPI)
On a 2x display the static texture is physical-sized, but glyphs were
rasterized from the font at its logical point size and then stretched to
fill it, so text looked soft. Bake each glyph from a copy of the font
scaled by the backing factor (g_atlas_scale) and divide the physical
metrics back to logical pixels at the draw site, so the quad stays
logical-sized but is textured from a high-res glyph that maps ~1:1 onto
the physical texture. The atlas is dropped and rebuilt if the scale
changes (window moved to a different-DPI monitor).

No-op on 1x displays (scale == 1): verified AE unchanged at 0.98% vs NS.

Also add Fase I to TODO.org: a neutral drawing-backend abstraction so
macOS uses Metal and Linux/Windows use OpenGL.
2026-06-04 08:54:03 +02:00
df8a190e28 Metal: fix inline images rendering upside down
mtl_texture_for_image flipped the CGBitmapContext CTM before drawing the
NSImage, but an upright draw into a bitmap context already places the
visual top of the image in the first memory row, which is what Metal's
texture row 0 (V=0, top of the quad) expects. The extra flip was the lone
inversion, so images came out upside down. Drop it.

Verified with a top-red/bottom-blue probe: red now lands on top.
2026-06-04 08:54:03 +02:00
0e1e6f983d Metal: torpedo cursor is instant with a self-fading comet trail
The animator cached cursorMode at init, so mtl-cursor-mode (and
mtl-scroll-effect) only updated the global and a live frame kept its
old mode (the default spring), which is why the cursor still moved with
a transition. Propagate the value to live animators immediately.

In torpedo mode the cursor now snaps straight to the target cell (no
spring), and the trail samples carry their own age so the tail fades on
its own ~0.4s after the cursor stops, combining a spatial taper with a
temporal fade so it reads as a comet rather than a uniform bar.
2026-06-04 08:54:03 +02:00
277b69ddca Metal: animated cursor uses the real frame color, no double cursor
When the animation layer is enabled, draw the cursor only in the
compositor (skip the static one in mtl_draw_window_cursor) so there is
no double cursor, and feed the animator the real FRAME_CURSOR_COLOR
instead of the hardcoded cyan used for the trail and cursor quads.
2026-06-04 08:54:03 +02:00
4b29e4bc8f Metal: draw face box / 3D relief (F2)
mtl_draw_glyph_string ignored face->box, so boxed faces (mode line with its
released-button relief, buttons, etc.) rendered flat. Port
ns_dumpglyphs_box_or_relief: compute the box rect and left/right edge presence
from the glyph string, then draw the four edges. FACE_SIMPLE_BOX uses box_color;
raised/sunken reliefs use highlight/shadow shades of the base (box_color or
background) at level 0.4, matching NSColor highlightWithLevel:/shadowWithLevel:.

Mode line now shows its 3D border; the bottom/right shadow matches NS. The
top/left highlight is a touch brighter than NS (subtle 1px), to refine later.
2026-06-04 08:54:03 +02:00
fd1815b763 Metal: window borders/dividers use real faces (D2)
mtl_draw_vertical_window_border and mtl_draw_window_divider hardcoded 0x4C566A.
Port the NS logic: vertical border uses VERTICAL_BORDER_FACE_ID; window divider
uses WINDOW_DIVIDER_FACE_ID with distinct first/last pixel faces
(WINDOW_DIVIDER_FIRST/LAST_PIXEL_FACE_ID) for wide/tall dividers, falling back
to the frame foreground.
2026-06-04 08:54:03 +02:00
f2fc640ded Metal: implement fringe bitmaps (D3)
mtl_draw_fringe_bitmap was a stub, so truncation/continuation arrows, the
buffer-boundary and other fringe indicators never appeared. Implement it
mirroring ns_draw_fringe_bitmap: clear the fringe background (and the wider bx
area) unless overlay, then rasterize p->bits (MSB-first rows, visible window
[dh, dh+h)) into a one-shot R8 coverage texture and draw it as a colored quad
through the glyph pipeline. Color is face->foreground, or the cursor color when
cursor_p. A fresh texture per call avoids the deferred-sampling hazard of
sharing one texture across queued draws.

Verified: the truncation arrow now matches the NS backend.
2026-06-04 08:54:03 +02:00
0a0de5cb88 Metal: implement scroll_run (move pixels in the static texture)
mtl_scroll_run was a stub that only nudged the animator, so Emacs's scroll
optimization left stale/duplicated text: scrolling (C-v, recenter) and any
re-layout (window split, *Completions*/*Warnings* popups) painted new rows over
the old ones because the moved block was never relocated.

Now mtl_scroll_run mirrors ns_scroll_run's geometry (window_box +
WINDOW_TO_FRAME_PIXEL_Y, clamped to avoid the mode line) and moves the block
inside the static texture with a GPU blit. Since a single copy can't overlap
its own source/destination, it bounces the region through a scratch texture.
The render encoder is ended and reopened (LOAD) around the blit so subsequent
draw_glyph_string calls land on the moved pixels; Metal's hazard tracking
orders the copy after the draws. Encoder creation is factored into
openRenderEncoderClear:.

Verified with the comparison harness: scrolling and split/relayout no longer
leave ghost text.
2026-06-04 08:54:03 +02:00
db522d9eec Metal: crisp text — advance on Emacs's integer grid, disable font smoothing
- mtl_draw_glyph_string advanced the pen by CoreText's fractional glyph advance
  instead of Emacs's layout grid. Across a line the drift accumulated, glyphs
  landed at fractional positions (linear-sampling blur) and progressively
  overlapped/clipped. Advance by first_glyph[i].pixel_width at integer
  positions so Metal stays locked to Emacs's grid and the 1:1 blit is crisp.
- Disable CoreText font smoothing in the glyph rasterization context: the
  white-on-black mask was stem-darkened, making text heavier than NS
  (mean gray 220 vs 226). Now ~228, matching NS within ~1.7 levels.
2026-06-04 08:54:03 +02:00
9c7a7a2128 Metal: gate animations, draw cursor in texture, fix glyph baseline
- Add g_mtl_animations_enabled (default off): the 60fps compositor overlay
  (cyan cursor, particles, CADisplayLink) is now opt-in via (mtl-animations t)
  / mtl-toggle-animations. With it off, compositeToScreen only blits + presents,
  removing the stray cyan cursor box that tinted the frame.
- Draw the cursor directly into the static texture like the NS backend
  (get_phys_cursor_glyph + get_phys_cursor_geometry, FRAME_CURSOR_COLOR,
  filled/hollow/bar/hbar), and handle DRAW_CURSOR in mtl_draw_glyph_string so
  the glyph under a filled cursor stays readable (inverse).
- Fix glyph vertical baseline: bearing_y stored the descent instead of the
  distance from the cell top to the baseline, dropping every glyph ~one ascent
  too low and overlapping the next line / mode line. Store bh-1-raster_oy.
2026-06-04 08:54:03 +02:00
9c112c768d Fix text rendering: MTLLoadActionLoad + glyph ID path + rif copy
Three critical bugs fixed:

1. MTLLoadActionClear wipes staticTexture every update_begin cycle.
   Emacs calls update_begin/end multiple times per second (cursor blink,
   modeline, etc.). Each call was clearing all previously drawn content.
   Fix: only clear on texture (re)creation; use MTLLoadActionLoad to
   PRESERVE content between update_begin cycles. Emacs's draw_glyph_string
   fills backgrounds only for the regions being updated.

2. char2b contains CGGlyph IDs (not Unicode codepoints) in the macfont
   backend. mtl_draw_glyph_string was calling mtl_cache_glyph() which
   used CTFontGetGlyphsForCharacters (Unicode→glyph) on values that were
   already glyph IDs — double conversion, wrong glyphs rendered.
   Fix: new mtl_cache_glyph_id() uses CTFontDrawGlyphs directly with the
   glyph ID from char2b, same as ns_draw_glyph_string_foreground does.

3. mtl_patch_terminal_rif replaced the ENTIRE terminal rif (including
   NULL frame_parm_handlers). init_frame_faces/realize_basic_faces accesses
   rif->frame_parm_handlers during Fx_create_frame → SIGSEGV.
   Fix: copy the NS rif (preserving frame_parm_handlers and all management
   functions), then override ONLY the pixel-drawing functions with Metal.

Added: mtl-capture-frame, mtl-draw-stats diagnostics (kept for debugging).
2026-06-04 08:54:03 +02:00
ab0972e901 Fix crash: replace NSMapTable with CFMutableDictionaryRef for image cache
Root cause (macOS 26.5):
  NSMapTable with NSMapTableObjectPointerPersonality used the NSValue*
  wrapper POINTER ADDRESS for equality, not the wrapped struct image*
  content. This caused:
  1. Cache always missed (two NSValue objects wrapping same pointer
     are NOT equal by address)
  2. NSValue objects leaked in the map table indefinitely
  3. On macOS 26.5, NSMapTable's internal GCD-backed implementation
     confused leaked NSValue memory regions with OS_dispatch_source
     objects, causing -[OS_dispatch_source objectForKey:] crash in
     mtl_draw_glyph_string on first IMAGE_GLYPH render

Fix: CFMutableDictionaryRef with NULL key callbacks uses raw pointer
equality (struct image* directly as key) with CF retain for values.
No NSValue wrapper, no ObjC runtime quirks.

Also fixed: NSWindowDidChangeScreenNotification observer was created
with addObserverForName:object:queue:usingBlock: but the returned
observer TOKEN was dropped. On macOS 26.5 the token is internally an
OS_dispatch_source; when the autoreleased token was freed, the memory
could be reused by adjacent static variables. Fixed by replacing the
notification with a KVO observer on the 'window' key path using the
existing MtlResizeObserver (stored as associated object, safe lifetime).

CGBitmapInfo fix: use kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little
instead of Big-endian RGBA. Metal BGRA8Unorm expects little-endian byte order,
avoiding a separate R<->B swap pass.
2026-06-04 08:54:03 +02:00
1b9b622f14 Add Metal GPU display backend (emacs-gl, Phases 0-6)
New backend --with-mtl that adds Apple Metal GPU rendering on top of
the existing NS (Cocoa) backend on macOS.

Architecture:
- CAMetalLayer sublayer on EmacsView, stored as ObjC associated object
- mtl-enable-for-frame patches terminal->rif, update_begin/end hooks
- Emacs renders to staticTexture; CADisplayLink composites at 60fps

Files added:
- src/mtlterm.h  -- types: MtlFrameData, MtlAnimator, MtlView, MtlWindow
- src/mtlterm.m  -- full implementation (~2300 lines)
- src/mtlfns.m   -- Lisp interface (mtl-enable-for-frame, mtl-cursor-mode, etc.)
- src/mtl_shaders.metal -- MSL shaders (glyph, rect, blit, particle, image)
- lisp/mtl.el    -- user-facing Elisp configuration module

Files modified:
- configure.ac   -- --with-mtl option, Metal/Metal.h detection
- src/Makefile.in -- MTL_OBJ / MTL_OBJC_OBJ variables
- src/emacs.c    -- calls syms_of_mtlfns() on startup

Features implemented:
Phase 1: skeleton (NSWindow + CAMetalLayer, shader compilation)
Phase 2: text rendering (CoreText glyph atlas, R8Unorm, CHAR_GLYPH)
Phase 3: input handling (keyboard/mouse/resize/multi-monitor)
Phase 4: GPU animations at 60fps via CADisplayLink:
         - 8 cursor modes: block/spring/torpedo/sonicboom/ripple/pixiedust/hollow/beam
         - Spring physics (critically-damped, omega=8, ~150ms settle)
         - 5 scroll easing functions (ease-out-quad default)
Phase 5: inline images (NSImage -> MTLTexture, RGBA pipeline, IMAGE_GLYPH)
Phase 6: Elisp config module (mtl-enable, mtl-mode, defcustom)

Usage:
  ./configure --with-ns --with-mtl CC="xcrun clang"
  make
  ;; In Emacs:
  (require 'mtl)
  (mtl-enable)
2026-06-04 08:54:03 +02:00
David Ponce
e6e79b1e09 Don't unconditionally append the :ascent property in wid-edit
* lisp/wid-edit.el (widget-toggle-value-create): Don't
duplicate the :ascent property if already set.  (Bug#81167)
2026-06-04 09:06:52 +03:00
Xiyue Deng
d852d36c77 Decrypt plstore when needed in 'plstore-delete'
When a plstore has entries with secret keys, processing the plstore
file would require decryption first.  However, unlike other functions
like 'plstore-get', 'plstore-put', etc., 'plstore-delete' does not
check for secret keys and decrypt the file, which would corrupt the
file when deleting any entries with secret keys.
This patch adds checking for secret keys and decrypt the file when
needed before removing the entry with name.
* lisp/plstore.el (plstore--has-secret-keys): New.
* lisp/plstore.el (plstore-delete): Check for secret keys of the entry
and decrypt plstore before performing the deletion.  (Bug#81061)
2026-06-04 08:37:25 +03:00
Dmitry Gutov
c9dfe2abe6 Avoid background fills on parent during child frame resize/move/hide
* src/xterm.c (x_suspend_background_fills)
(x_restore_background_fills): New functions.
(x_set_window_size, x_set_window_size_and_position)
(x_make_frame_invisible): Use them (bug#80961).
2026-06-04 06:42:19 +03:00
Pip Cet
08336b9a55 Always return a list from send-to--collect-items
* lisp/send-to.el (send-to--collect-items): Return singleton list, not
a string directly.
2026-06-03 18:15:22 +00:00
Pip Cet
44fa1595ce * lisp/send-to.el (send-to--resolve-handler): Add autoload. 2026-06-03 18:15:22 +00:00
Michael Albinus
2db5a145ac Support Ansible messages in compilation-mode
* etc/NEWS: Mention Ansible integration in compilation mode.

* etc/compilation.txt: Add examples of Ansible error, warning and
note messages.  Fix typos.

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add Ansible regexps for
error, warning and note messages.

* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add new test cases.
(compile-test-error-regexps): Increase expected infos.
2026-06-02 12:43:08 +02:00
João Távora
bfa4d6dd40 Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31
Ported from emacs-31 release branch:

   commit 984932d4dc
   Author: Sean Whitton <spwhitton@spwhitton.name>
   Date:   Mon Jun 1 11:48:42 2026 +0100

       Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31

This synchronizes master's Eglot with emacs-31.  The goal of that commit
is to demote those markdown-ts-mode.el modes to "experimental" status in
emacs-31, but Eglot was already relying on them and changes were needed.

984932d4dc is not the commit that best
does those changes, but since that commit was marked "do not merge" on
emacs-31, I thought it best to bring it here manually so any further
work -- which doesn't contradict the overarching intention -- can
continue in emacs-31 with clean merges to master (where the GNU-devel
core Elpa package is pulled from).

* lisp/progmodes/eglot.el (eglot-documentation-renderer)
(eglot--format-markup): Don't call eglot--builtin-mdown-p.
* doc/misc/eglot.texi (Customization Variables):
* etc/EGLOT-NEWS: Don't mention markdown-ts-mode

Co-authored-by: Sean Whitton <spwhitton@spwhitton.name>
2026-06-01 19:11:46 +01:00
Paul Eggert
43f1630346 Improve x_free_gc checking when debugging
* src/xfaces.c (x_free_gc): When debugging,
also diagnose unlikely case when ngcs == INT_MIN.
2026-06-01 09:55:54 -07:00
Paul Eggert
7502836378 Pacify -Wuseless-cast if --enable-checking=all
Problem reported by Helmut Eller (Bug#81132#25).
* src/dispextern.h (IF_DEBUG): Omit cast that is useless if
the argument is already void.
* src/ftfont.c (adjust_anchor): Omit useless cast.
2026-06-01 09:55:54 -07:00
Eli Zaretskii
94eb6389d4 Prevent segfaults due to frame resizing at the wrong time
* src/dispextern.h:
* src/xdisp.c (dont_resize_frames): New variable.
(unwind_format_mode_line): Decrement 'dont_resize_frames'.
(gui_consider_frame_title, display_mode_line, Fformat_mode_line):
Increment 'dont_resize_frames'.
* src/dispnew.c (do_pending_window_change): Don't resize frames if
'dont_resize_frames' is non-zero.  (Bug#81121)
2026-06-01 15:03:45 +03:00
Sean Whitton
32c329253f ; Move markdown-ts-mode to correct NEWS file. 2026-06-01 12:53:44 +01:00
Dan R. K. Ports
eac3779a8f Check whether g_settings_schema_source_get_default returned NULL
* src/pgtkfns.c (parse_resource_key):
* src/xsettings.c (init_gsettings): Check whether
g_settings_schema_source_look up returned NULL (bug#81166).

Copyright-paperwork-exempt: yes
2026-06-01 12:49:24 +01:00
Sean Whitton
ba0b29e808 ; Merge from origin/emacs-31
The following commit was skipped:

984932d4dc Disable markdown-ts-mode & markdown-ts-view-mode for Emac...
2026-06-01 11:52:53 +01:00
Sean Whitton
b64d163979 Merge from origin/emacs-31
2c2f1c00ac ; * lisp/vc/vc-dir.el (vc-dir-update): Add an assertion.
51f823a3af ; * etc/NEWS: Fix annotation.
271cc5c76c More tests for fill-paragraph-handle-comment.erts
cc9f35c54b ; * etc/PROBLEMS: Minor fixes of last change.
2727a6f4e8 ; Document problems caused by validation of *.eln files o...
f1dd84bec9 ; * lisp/play/doctor.el (doctor-death): Fix Samaritans UR...
0bfbe06090 Update to Org 9.8.5
aac5e0457a Eglot: replace eglot-prefer-plaintext with eglot-document...
ec3d662de0 Make HTML button elements tab-stoppable in eww (bug#81107)

# Conflicts:
#	etc/NEWS
2026-06-01 11:52:53 +01:00
Sean Whitton
984932d4dc Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31
Do not merge to master.

* lisp/progmodes/eglot.el (eglot-documentation-renderer)
(eglot--format-markup): Don't call eglot--builtin-mdown-p.
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode)
(markdown-ts-view-mode): Mark as experimental.
(auto-mode-alist, treesit-major-mode-remap-alist): Don't add
anything.
* doc/misc/eglot.texi (Customization Variables):
* etc/EGLOT-NEWS:
* etc/NEWS: Don't mention markdown-ts-mode or
markdown-ts-view-mode.
2026-06-01 11:48:42 +01:00
Sean Whitton
2c2f1c00ac ; * lisp/vc/vc-dir.el (vc-dir-update): Add an assertion. 2026-06-01 09:51:08 +01:00
Sean Whitton
51f823a3af ; * etc/NEWS: Fix annotation. 2026-06-01 09:50:56 +01:00
Po Lu
75d8e5773d Restore runtime dependencies to documentation files
* Makefile.in (MAKE_DOC_FOR_DOCLANG): Remove unnecessary .PHONY
definitions for targets which will be encompassed by $(DOC).
(MAKE_DOC): Create a common target to to which to assign runtime
dependencies.
(misc-info-common, misc-dvi-common, misc-html-common)
(misc-pdf-common, misc-ps-common): Assign runtime dependencies
on Lisp etc. previously assigned to the bare targets now subject
to indirection.
2026-06-01 12:15:04 +08:00
Paul Eggert
6db4271ee8 Ignore SO_RCVTIMEO errors in emacsclient
* lib-src/emacsclient.c: Include <stdckdint.h>
(timeout): Now signed, and initially -1.  All uses changed.
(decode_options): Do not worry about ERANGE or ranges, as other
code now deal with this; the old code was wrong anyway as it mixed
uintmax_t with INTMAX_MAX and INTMAX_MIN.  But do check for syntax
errors and negative values.
(set_socket_timeout): Don’t time out if the timeout is 0 or enormous.
Silently ignore errors (Bug#81160).
(main): Allow --timeout=0, as per documentation.
2026-05-31 12:48:42 -07:00
Juri Linkov
271cc5c76c More tests for fill-paragraph-handle-comment.erts
* test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts:
Add more tests for current comment lines (bug#80449).
2026-05-31 21:36:12 +03:00
Vincent Belaïche
8902361cba README for manual translations available, and how to compile them 2026-05-31 14:57:41 +02:00
Vincent Belaïche
35af8d1099 Make build in doc/ happen in parallel over DOCLANGS
This also avoids using ";" in make rules, which doesn't propagate
errors from the first command to the entire line.

* Makefile.in (MAKE_DOC_FOR_DOCLANG): New.
  (MAKE_DOC): delegate to 'MAKE_DOC_FOR_DOCLANG' per language doc build.
2026-05-31 14:22:36 +02:00
Vincent Belaïche
3d01d53c1e Make doc/ build fail on DOCLANG=dummy
* doc/misc/Makefile.in (DOCLANG): Call 'error' when asked to
  produce manuals for a language we don't know about.
2026-05-31 14:22:34 +02:00
Vincent Belaïche
1f662e2ab7 ; * m4/texinfo.m4 (gl_SET_MAKEINFO): Fix introductory comment. 2026-05-31 14:22:33 +02:00
Vincent Belaïche
c44f7ada0c Avoid using the LANG environment variable
Amend commit 75153f7b76 " Fix clash with locale variable" by Andreas Schwab.
Use DOCLANG instead of INFO_LANG for renaming, as documentation does not
produce only info output, and DOCLANG is iterating over DOCLANGS.

* Makefile.in: Rename 'LANG' to 'DOCLANG' to avoid clash with well-known
  environment variable.

* doc/misc/Makefile.in: Adjusted accordingly, rename 'INFO_LANG' to 'DOCLANG'
  where Andreas had already renamed 'LANG'.

* doc/translations/fr/misc/ses-fr.texi: rename 'INFO_LANG' to 'DOCLANG' in
  explanatory comment.
2026-05-31 14:20:14 +02:00
Eli Zaretskii
cc9f35c54b ; * etc/PROBLEMS: Minor fixes of last change. 2026-05-31 12:40:11 +03:00
Aaron Jensen
2727a6f4e8 ; Document problems caused by validation of *.eln files on macOS
* etc/PROBLEMS: Document slowdown on macOS caused by the OS
validation of *.eln files.
2026-05-31 12:34:51 +03:00
Eli Zaretskii
f1dd84bec9 ; * lisp/play/doctor.el (doctor-death): Fix Samaritans URL (bug#81155). 2026-05-31 12:29:50 +03:00
Andreas Schwab
75153f7b76 Fix clash with locale variable
LANG is a locale variable, use INFO_LANG instead.

* doc/misc/Makefile.in (INFO_LANG): Renamed from LANG, all uses
changed.
* doc/translations/fr/misc/ses-fr.texi: Use INFO_LANG instead of
LANG.
2026-05-31 11:08:51 +02:00
Eli Zaretskii
64f4ce7b2d Allow optionally disabling the use of TABs for TTY cursor movement
* src/term.c (syms_of_term) <tty-cursor-movement-use-TAB>: New var.
<tty-cursor-movement-use-TAB-BS>: Doc fix.
* src/cm.c (calccost): Use it to disable use of TABs for cursor
motion on text terminals.

* etc/NEWS: Announce the new variable.
2026-05-31 11:36:15 +03:00