<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chemacs.git/src/term.c, branch devmain</title>
<subtitle>emacs
</subtitle>
<id>http://cgit.adnoto.dev/chemacs.git/atom?h=devmain</id>
<link rel='self' href='http://cgit.adnoto.dev/chemacs.git/atom?h=devmain'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/'/>
<updated>2026-05-31T08:36:15Z</updated>
<entry>
<title>Allow optionally disabling the use of TABs for TTY cursor movement</title>
<updated>2026-05-31T08:36:15Z</updated>
<author>
<name>Eli Zaretskii</name>
<email>eliz@gnu.org</email>
</author>
<published>2026-05-31T08:36:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=64f4ce7b2d9d8bf8c291b8b6993f9b4ced51814c'/>
<id>urn:sha1:64f4ce7b2d9d8bf8c291b8b6993f9b4ced51814c</id>
<content type='text'>
* src/term.c (syms_of_term) &lt;tty-cursor-movement-use-TAB&gt;: New var.
&lt;tty-cursor-movement-use-TAB-BS&gt;: 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.
</content>
</entry>
<entry>
<title>Fix the MSDOS build</title>
<updated>2026-05-28T04:59:55Z</updated>
<author>
<name>Po Lu</name>
<email>luangruo@yahoo.com</email>
</author>
<published>2026-05-28T03:33:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=de926d281a111a86b1907636c958508e1b71e198'/>
<id>urn:sha1:de926d281a111a86b1907636c958508e1b71e198</id>
<content type='text'>
* msdos/sedlibmk.inp (GL_GNULIB_STDC_[^ =] &amp;c.): Rename from
GL_STDC_... and define to 1 before other variables prefixed
GL_GNULIB_ are defined to 0.
(NEXT_AS_FIRST_DIRECTIVE_STDBIT_H)
(NEXT_AS_FIRST_DIRECTIVE_STDCOUNTOF_H, STDCOUNTOF_H): Define.
(GL_HAVE_STDBIT_H_CONDITION): Replace
GL_GENERATE_STDBIT_H_CONDITION.
(CXX_HAVE_STDCOUNTOF_H, GL_GNULIB_STREQ, GL_GNULIB_MEMEQ)
(GL_GNULIB_STRNUL, GL_GENERATE_STDCOUNTOF_H_CONDITION):
Substitute "1".

* src/conf_post.h (_REGEX_AVOID_UCHAR_H) [MSDOS]: Define to 1.

* src/term.c (init_tty) [MSDOS]: Set TN_max_colors to 16,
which was deleted inadvertently with recent MS Windows
modifications.

* config.bat: Rename stdcountof.in.h appropriately.
</content>
</entry>
<entry>
<title>ARRAYELTS → countof</title>
<updated>2026-05-27T04:57:20Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2026-05-27T00:51:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=225876e97999664a075eb6f1489b4b4c8e515ded'/>
<id>urn:sha1:225876e97999664a075eb6f1489b4b4c8e515ded</id>
<content type='text'>
C2y will standardize countof as the macro that Emacs uses the name
ARRAYELTS for.  Switch to the standard name, which is supported
by GCC 16+, by Clang 21, and by the Gnulib stdcountof-h module already
in use for compilers that do not support countof.
Also, use countof in a few places where we missed using ARRAYELTS.
* admin/coccinelle/arrayelts.cocci: Suggest countof, not ARRAYELTS.
* admin/merge-gnulib (GNULIB_MODULES): Add stdcountof-h,
as it is now a direct rather than an indirect dependency.
* exec/trace.c, src/lisp.h, src/sfnt.c: Include &lt;stdcountof.h&gt;.
(ARRAYELTS): Remove.  All uses replaced by countof.
* lib-src/ebrowse.c, lib-src/etags.c, lib-src/make-docfile.c:
* lib-src/seccomp-filter.c, lwlib/lwlib-Xaw.c:
Prefer &lt;stdcountof.h&gt; and countof to doing things by hand.
</content>
</entry>
<entry>
<title>Omit useless casts found by GCC 16</title>
<updated>2026-05-27T04:57:19Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2026-05-27T00:51:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=5d8bb14d3b90513ed1a849ebbafb82a7734d9c8c'/>
<id>urn:sha1:5d8bb14d3b90513ed1a849ebbafb82a7734d9c8c</id>
<content type='text'>
GCC 16’s -Wuseless-cast warning can be useful.
Fix the useless casts it identifies, and also fix false positives
by using compound literals, which are safer anyway than casts.
* src/composite.c (composition_adjust_point)
(Ffind_composition_internal):
* lwlib/xlwmenu.c (xlwMenuResources, xlwMenuClassRec)
(resource_widget_value, XlwMenuDestroy, Select):
* src/alloc.c (process_mark_stack):
* src/data.c (Faref):
* src/emacs-module.c (module_extract_big_integer):
* src/fileio.c (Finsert_file_contents):
* src/frame.h (FRAME_MESSAGE_BUF_SIZE):
* src/gtkutil.c (xg_tool_item_stale_p, update_frame_tool_bar):
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load, gif_load):
* src/pdumper.c (ptrdiff_t_to_dump_off, dump_queue_dequeue)
(field_relpos, dump_field_emacs_ptr)
(dump_object_start_pseudovector, pdumper_remember_scalar_impl)
(pdumper_load, syms_of_pdumper):
* src/regex-emacs.c (BUF_PUSH, BUF_PUSH_2, POINTER_TO_OFFSET):
* src/xdisp.c (remember_mouse_glyph, pint2str):
* src/xterm.c (cvt_string_to_pixel, handle_one_xevent):
Omit useless casts.  Perhaps they were formerly needed,
but they should not be needed now.
* src/alloc.c (Fmemory_info):
* src/category.c (Fdefine_category, Fmodify_category_entry):
* src/data.c (Fash):
* src/dispextern.h (GLYPH_CODE_P):
* src/emacs.c (load_seccomp):
* src/fns.c (Flocale_info, maybe_resize_hash_table):
* src/indent.c (check_display_width):
* src/json.c (symset_size):
* src/lisp.h (XUNTAG, BOOL_VECTOR_LENGTH_MAX, obarray_size)
(hash_table_index_size):
* src/lread.c (make_obarray, grow_obarray, Fobarray_clear):
* src/menu.c (digest_single_submenu, x_popup_menu_1):
* src/term.c (init_tty):
* src/widget.c (update_wm_hints):
* src/xdisp.c (truncate_echo_area):
* src/xfns.c (x_set_border_pixel):
* src/xfont.c (xfont_match, xfont_open):
* src/xmenu.c (set_frame_menubar):
* test/src/emacs-module-resources/mod-test.c (emacs_module_init):
Use compound literal instead of a cast that is useless in
some platforms but not others.
* src/dispextern.h, src/haikugui.h, src/w32gui.h:
(WINDOW_HANDLE_UINTPTR): New macro.
* src/frame.c (gui_report_frame_params):
* src/xterm.c (x_try_cr_xlib_drawable):
Use it.
* src/lisp.h (XUNTAG): And tag with UINTPTR_MAX to pacify
gcc warning about a constant out of range.
(hash_idx_t): Make it int_least32_t, as it need not be exactly 32 bits.
(PRIdHASH_IDX): New macro.
* src/pdumper.c (dump_queue_dequeue): Use it.
* src/profiler.c (setup_cpu_timer): Make a local EMACS_INT
rather than int, to avoid need for casting later.
* src/syntax.c (uninitialized_interval):
Use 1u rather than 1 so the cast is always useful.
A compound literal wouldn’t do here, as this macro
needs to be an integer constant expression.
* src/xfns.c (XICCallback, XICProc): Remove macros.
(Xxic_preedit_start_callback): Use a cleaner way to specify it,
avoiding the need for type macros, and for a cast
if HAVE_XICCALLBACK_CALLBACK.
* src/xterm.c (handle_one_xevent): 2nd arg is now XEvent *
on all platforms, as there is no need to diverge, and
diverging meant we needed lots of unnecessary casts.
</content>
</entry>
<entry>
<title>Prefer ptrdiff_t to size_t when either will do</title>
<updated>2026-05-24T02:18:53Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2026-05-23T16:59:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=2e91ed5f129a4c03f7345d15d61232bd15028a4e'/>
<id>urn:sha1:2e91ed5f129a4c03f7345d15d61232bd15028a4e</id>
<content type='text'>
Signed types are a bit safer, as they avoid some comparison confusion
and -fsanitize=undefined can check more misuses of them.
* src/alloc.c (lisp_malloc, lisp_align_malloc)
(allocate_string_data, allocate_vector_from_block, object_bytes):
* src/coding.c (from_unicode_buffer):
* src/decompress.c (acc_size, accumulate_and_process_md5):
* src/emacs.c (load_seccomp, shut_down_emacs):
* src/fns.c (sxhash_bignum):
* src/ftfont.c (get_adstyle_property):
* src/image.c (lookup_image, xpm_init_color_cache)
(xpm_cache_color):
* src/json.c (json_out_str, struct json_parser)
(json_make_object_workspace_for_slow_path)
(json_make_object_workspace_for, json_parse_array)
(json_parse_object):
* src/sysdep.c (get_current_dir_name_or_unreachable)
(init_sys_modes, convert_speed):
* src/termchar.h (struct tty_display_info):
* src/textconv.h (struct textconv_conversion_text):
* src/xfns.c (struct x_xim_text_conversion_data)
(x_encode_xim_text):
* src/xselect.c (struct transfer, c_size_for_format)
(x_size_for_format, selection_data_for_offset)
(selection_data_size, x_start_selection_transfer)
(x_continue_selection_transfer):
Prefer ptrdiff_t to size_t when either will do.
* src/term.c (Ftty__set_output_buffer_size):
Limit output buffer size to PTRDIFF_MAX as well as to SIZE_MAX.
</content>
</entry>
<entry>
<title>New function memory_full_up</title>
<updated>2026-05-24T02:18:52Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2026-05-20T01:39:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=1eb2e052bb55184d62c1dec265f6d327be4e9113'/>
<id>urn:sha1:1eb2e052bb55184d62c1dec265f6d327be4e9113</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>Fix line-truncation on horizontally-split TTY frames</title>
<updated>2026-04-25T11:39:53Z</updated>
<author>
<name>Eli Zaretskii</name>
<email>eliz@gnu.org</email>
</author>
<published>2026-04-25T11:39:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=700768cd1d192bbd5e1f7c21e977ffb1e9488445'/>
<id>urn:sha1:700768cd1d192bbd5e1f7c21e977ffb1e9488445</id>
<content type='text'>
* src/term.c (append_glyph, append_composite_glyph)
(append_glyphless_glyph): Account for the right-border glyph
when computing the end glyph of TEXT_AREA.  (Bug#80900)
</content>
</entry>
<entry>
<title>Simplify Tc/COLORTERM=truecolor escape sequence</title>
<updated>2026-04-23T07:32:50Z</updated>
<author>
<name>Peter Oliver</name>
<email>git@mavit.org.uk</email>
</author>
<published>2026-04-22T12:04:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=74d411d600502b6af8d7a8c6b24d88a0fc964619'/>
<id>urn:sha1:74d411d600502b6af8d7a8c6b24d88a0fc964619</id>
<content type='text'>
This should be more readable to most people, since C is
more widely familiar than the terminfo language.
* src/term.c (init_tty): Do the conversion from a single integer
24-bit color value to three 8-bit RGB values up-front.
(Bug#70941)
</content>
</entry>
<entry>
<title>Support setrgbb/setrgbf for setting 24-bit color</title>
<updated>2026-04-23T07:29:00Z</updated>
<author>
<name>Tim Ruffing</name>
<email>crypto@timruffing.de</email>
</author>
<published>2021-11-12T19:37:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=8aa7f6a50135a26ed8cabd9bdd47e46c774167b6'/>
<id>urn:sha1:8aa7f6a50135a26ed8cabd9bdd47e46c774167b6</id>
<content type='text'>
* src/term.c (turn_on_face): Account for TF_rgb_separate.
(init_tty): Support setrgbf/setrrgbb and set TF_rgb_separate
accordingly.
* src/termchar.h: Update commentary.
(Bug#70941)
</content>
</entry>
<entry>
<title>Use expected escape sequence for terminfo Tc and COLORTERM=truecolor</title>
<updated>2026-04-23T07:20:41Z</updated>
<author>
<name>Peter Oliver</name>
<email>git@mavit.org.uk</email>
</author>
<published>2026-04-04T23:24:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=84ae97f865cfc08351972de33b457840f011c067'/>
<id>urn:sha1:84ae97f865cfc08351972de33b457840f011c067</id>
<content type='text'>
When the non-standard terminfo capability Tc is present, or the
environment variable COLORTERM is set to truecolor, use a
hard-coded escape sequence that addresses all colors directly by
their RGB values.

Previously we used escape sequences cribbed from terminfo's
setaf/setab for direct color, that expect that we will only try to
use colors 000000 to 000007 for the first eight indexed colors.
This isn't something we currently handle.

* doc/misc/efaq.texi (Colors on a TTY): Fix off-by-one error in list
of indexed colors for terminfo RGB terminals.
* src/term.c (init_tty): Don’t use any indexed colors with terminfo
Tc capability or COLORTERM=truecolor environment variable (bug#70941).
</content>
</entry>
</feed>
