<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chemacs.git/src/coding.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-24T02:18:53Z</updated>
<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>Avoid memsets in coding.c</title>
<updated>2026-05-24T02:18:53Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2026-05-21T16:21:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=c72e6cdc464e295d821da24232a2913bbcecf3f8'/>
<id>urn:sha1:c72e6cdc464e295d821da24232a2913bbcecf3f8</id>
<content type='text'>
* src/coding.c (detect_coding_utf_16, Fset_coding_system_priority):
Rewrite memset to initializers.
</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>Pacify -Wunused-but-set-variable from gcc 16 and clang 13</title>
<updated>2026-04-30T05:45:52Z</updated>
<author>
<name>Collin Funk</name>
<email>collin.funk1@gmail.com</email>
</author>
<published>2026-04-30T03:04:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=51ae6e12b922092b3b8a50cb2e5c2bd26235471b'/>
<id>urn:sha1:51ae6e12b922092b3b8a50cb2e5c2bd26235471b</id>
<content type='text'>
* src/coding.c: Remove file wide ignore pragma for
-Wunused-but-set-variable.
(detect_coding_XXX) &lt;consumed_chars&gt;: Mention that this variable might
need to be declared with the MAYBE_UNUSED attribute.
(detect_coding_utf_8, detect_coding_emacs_mule, detect_coding_iso_2022)
(encode_designation_at_bol, detect_coding_sjis, detect_coding_big5)
(detect_coding_ccl, detect_coding_charset) &lt;consumed_chars&gt;: Use the
MAYBE_UNUSED attribute.
</content>
</entry>
<entry>
<title>Fix infloop when decoding incomplete embedded UTF-8 input</title>
<updated>2026-03-07T11:36:58Z</updated>
<author>
<name>Pip Cet</name>
<email>pipcet@protonmail.com</email>
</author>
<published>2026-03-07T11:30:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=f254b2cc19004233d193817d7a353e0ad9e59590'/>
<id>urn:sha1:f254b2cc19004233d193817d7a353e0ad9e59590</id>
<content type='text'>
* src/coding.c (decode_coding_iso_2022): Record conversion result for
incomplete data.
</content>
</entry>
<entry>
<title>; Add 2026 to copyright years.</title>
<updated>2026-01-01T12:54:34Z</updated>
<author>
<name>Sean Whitton</name>
<email>spwhitton@spwhitton.name</email>
</author>
<published>2026-01-01T12:54:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=c31f6adc31d48076c63ad82b83b2970e1b0d7b9b'/>
<id>urn:sha1:c31f6adc31d48076c63ad82b83b2970e1b0d7b9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix some C symbol extern visibility</title>
<updated>2025-12-08T18:41:50Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2025-12-08T18:35:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=855ad6d870852144221a15d04f4b31969689bffb'/>
<id>urn:sha1:855ad6d870852144221a15d04f4b31969689bffb</id>
<content type='text'>
Make some C symbols static if they don’t need to be extern.
Also, remove a couple of functions that were discovered to be
unused as a result of this process, and mark two extern
functions intended to be usable from GDB.
* src/buffer.c (previous_overlay_change):
* src/composite.c (composition_lisp_table):
* src/fileio.c (file_name_directory):
* src/frame.c (check_tty):
* src/insdel.c (adjust_markers_for_insert):
* src/keyboard.c (unread_switch_frame, read_char)
(requeued_events_pending_p):
* src/sysdep.c (renameat_noreplace) [!HAVE_ANDROID]:
* src/textconv.c (get_conversion_field) [!HAVE_ANDROID]:
* src/treesit.c (TREESIT_BOB_LINECOL, TREESIT_TS_POINT_1_0)
(treesit_buf_tracks_linecol_p, make_treesit_parser)
(make_treesit_node):
* src/xdisp.c (x_y_to_hpos_vpos):
* src/xfaces.c (load_color) [!MSDOS]:
* src/xfns.c (x_real_pos_and_offsets):
* src/xterm.c (x_dnd_do_unsupported_drop):
Now static.  Move up if necessary.
* src/coding.c (utf8_string_p):
* src/keyboard.c (detect_input_pending_ignore_squeezables):
Remove; unused.
* src/frame.c (gui_set_alpha):
* src/textconv.c (start_batch_edit, end_batch_edit, commit_text)
(finish_composing_text, set_composing_text)
(set_composing_region, textconv_set_point_and_mark)
(delete_surrounding_text, request_point_update)
(textconv_barrier, replace_text, get_extracted_text)
(get_surrounding_text):
* src/xdisp.c (gui_union_rectangles):
* src/xterm.c (xi_frame_selected_for):
Define only if needed.
* src/treesit.c (treesit_debug_print_parser_list)
(treesit_debug_print_linecol): Declare EXTERNALLY_VISIBLE.
* src/xdisp.c (x_y_to_column_row): New function, defined
only if needed.  All external callers to x_y_to_hpos_vpos changed.
</content>
</entry>
<entry>
<title>(decode_coding): Avoid nested *-change-functions (bug#78042)</title>
<updated>2025-05-02T21:06:09Z</updated>
<author>
<name>Stefan Monnier</name>
<email>monnier@iro.umontreal.ca</email>
</author>
<published>2025-05-02T20:59:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=9048fcf22c3ec3b5cc77dbb98993a53f5f9b7cd5'/>
<id>urn:sha1:9048fcf22c3ec3b5cc77dbb98993a53f5f9b7cd5</id>
<content type='text'>
* src/coding.c (decode_coding): Avoid nested *-change-functions (bug#78042).

* test/src/editfns-tests.el (sanity-check-change-functions-before)
(sanity-check-change-functions-after): Record notifications in
`sanity-check-change-functions-op`.
(sanity-check-change-functions-with-op): Don't rely on
`sanity-check-change-functions-op` always holding only the `op`.
(sanity-check-change-functions-errors): Include the sequence of
notifications in the error info.
(editfns-tests--before/after-change-functions): Add tests for (bug#78042).
</content>
</entry>
<entry>
<title>(replace-region-contents): Improve and promote (bug#76313)</title>
<updated>2025-03-29T21:49:05Z</updated>
<author>
<name>Stefan Monnier</name>
<email>monnier@iro.umontreal.ca</email>
</author>
<published>2025-03-28T04:46:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=7c82cc8b975175aebbad1c43ec1cd98b3232f482'/>
<id>urn:sha1:7c82cc8b975175aebbad1c43ec1cd98b3232f482</id>
<content type='text'>
Swap the role of `replace-region-contents` and `replace-buffer-contents`,
so `replace-region-contents` is the main function, implemented in C,
and `replace-buffer-contents` is a mere wrapper (marked as obsolete).
Also remove the need to rely on narrowing and on describing the
new text as a function.
Finally, allow MAX-SECS==0 to require a cheap replacement, and
add an INHERIT argument.

* src/editfns.c: Include `coding.h`.
(Freplace_region_contents): Rename from `Freplace_buffer_contents`.
Change calling convention to that of `replace-region-contents`.
Add more options for the SOURCE argument.  Add INHERIT argument.
Skip the costly algorithm if MAX-SECS is 0.
* src/insdel.c (replace_range): Allow NEW to be a buffer.

* lisp/subr.el (replace-buffer-contents): New implementation.
* lisp/emacs-lisp/subr-x.el (replace-region-contents): Delete.

* doc/lispref/text.texi (Replacing): Document new API for
`replace-region-contents`.  Remove documentation of
`replace-buffer-contents`.

* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2, replace-buffer-contents-bug31837):
Use `replace-region-contents`.
(editfns--replace-region): Delete.
(editfns-tests--replace-region): Use `replace-region-contents`.
Adds tests for new types of SOURCE args.
</content>
</entry>
<entry>
<title>Merge from origin/emacs-30</title>
<updated>2025-03-12T02:09:09Z</updated>
<author>
<name>Sean Whitton</name>
<email>spwhitton@spwhitton.name</email>
</author>
<published>2025-03-12T02:09:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=99852fb867e4d7d2090cbb82ff12d86d2a6ed9cc'/>
<id>urn:sha1:99852fb867e4d7d2090cbb82ff12d86d2a6ed9cc</id>
<content type='text'>
894b0e3a2fe ; Adapt comment in tramp.el
cc87717fa07 Add keyword placeholder to tramp.el
7d0d61d8549 Rewrite ERT manual introduction
b2f124f2a88 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
59d1aac49df Document return values of the various read-* functions
</content>
</entry>
</feed>
