<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chemacs.git/src/textconv.h, 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>; 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>Pacify -Wunused-function re get_conversion_field</title>
<updated>2025-12-09T02:32:01Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2025-12-09T02:30:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=d10a649e1b3737524f64e14e6a033eec5d0ab17d'/>
<id>urn:sha1:d10a649e1b3737524f64e14e6a033eec5d0ab17d</id>
<content type='text'>
* src/textconv.c (get_conversion_field): Define only if HAVE_ANDROID,
since it is unused on non-Android.
</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>Update copyright year to 2025</title>
<updated>2025-01-01T07:39:17Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2025-01-01T07:39:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=4da38c632161867e914b3a13dc760f8019255f94'/>
<id>urn:sha1:4da38c632161867e914b3a13dc760f8019255f94</id>
<content type='text'>
Run "TZ=UTC0 admin/update-copyright".
</content>
</entry>
<entry>
<title>; Fix typos</title>
<updated>2024-07-18T09:46:50Z</updated>
<author>
<name>Stefan Kangas</name>
<email>stefankangas@gmail.com</email>
</author>
<published>2024-07-07T15:40:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=a6cab228d4d1a82a80eac81b057857a230eef0b5'/>
<id>urn:sha1:a6cab228d4d1a82a80eac81b057857a230eef0b5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Take fields into account during text conversion</title>
<updated>2024-04-29T04:34:39Z</updated>
<author>
<name>Po Lu</name>
<email>luangruo@yahoo.com</email>
</author>
<published>2024-04-21T13:51:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=430088c9ccec5fe9be57d267f45acdc87aa3b28e'/>
<id>urn:sha1:430088c9ccec5fe9be57d267f45acdc87aa3b28e</id>
<content type='text'>
* lisp/cus-edit.el (Custom-mode): Enable text conversion, now
that fields are correctly treated.

* src/alloc.c (mark_frame): Mark f-&gt;conversion.field.

* src/androidterm.c (android_update_selection): Adjust
conversion region and selection position by the field start and
end.

* src/editfns.c (find_field): Export function.

* src/frame.c (make_frame): Clear f-&gt;conversion.field.

* src/frame.h (struct text_conversion_state) &lt;field&gt;: New field.

* src/lisp.h (find_fields, reset_frame_conversion): Export
functions.

* src/minibuf.c (Fread_from_minibuffer): Reset frame conversion
if Voverriding_text_conversion_style is set.

* src/textconv.c (textconv_query): Narrow to field.
(reset_frame_conversion): New function.
(reset_frame_state): Clear conversion field.
(really_delete_surrounding_text): Narrow to field.
(locate_and_save_position_in_field): New function.
(really_request_point_update, really_set_point_and_mark)
(complete_edit_check, handle_pending_conversion_events_1)
(handle_pending_conversion_events, get_conversion_field)
(set_composing_region, textconv_set_point_and_mark, replace_text)
(get_extracted_text, get_surrounding_text, report_point_change):
Compute, narrow to and offset by the currently active field
whenever point is updated or a command is received.
(syms_of_textconv): Revise doc strings.

* src/textconv.h (get_conversion_field): Export function.
</content>
</entry>
<entry>
<title>; Add 2024 to copyright years</title>
<updated>2024-01-02T02:30:05Z</updated>
<author>
<name>Po Lu</name>
<email>luangruo@yahoo.com</email>
</author>
<published>2024-01-02T02:30:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=070cb32463a8c606bf4384574a6c7ea60167e87d'/>
<id>urn:sha1:070cb32463a8c606bf4384574a6c7ea60167e87d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce an input method callback required by Android 34</title>
<updated>2023-10-05T06:23:20Z</updated>
<author>
<name>Po Lu</name>
<email>luangruo@yahoo.com</email>
</author>
<published>2023-10-05T06:23:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=123b77436e187c6254d4585d08135a44077528d1'/>
<id>urn:sha1:123b77436e187c6254d4585d08135a44077528d1</id>
<content type='text'>
* java/org/gnu/emacs/EmacsInputConnection.java (replaceText):
New function.

* java/org/gnu/emacs/EmacsNative.java (replaceText): Declare
native function.

* src/androidgui.h (enum android_ime_operation): New operation
ANDROID_IME_REPLACE_TEXT.

* src/androidterm.c (android_handle_ime_event): Decode text when
encountering an ANDROID_IME_REPLACE_TEXT operation.  Return if
decoding overflowed rather than presenting Qnil to textconv
functions.
(replaceText): New JNI function.

* src/frame.h (enum text_conversion_operation): New operation
TEXTCONV_REPLACE_TEXT.

* src/textconv.c (really_commit_text): Move point to start if
the composing region is set.
(really_replace_text): New function.
(handle_pending_conversion_events_1) &lt;TEXTCONV_REPLACE_TEXT&gt;:
New case.
(replace_text): New function.

* src/textconv.h: Update prototypes.
</content>
</entry>
<entry>
<title>Update Android port</title>
<updated>2023-07-05T03:39:45Z</updated>
<author>
<name>Po Lu</name>
<email>luangruo@yahoo.com</email>
</author>
<published>2023-07-05T03:39:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=9e9142249725b4785a01734a8c0f50301fccdea7'/>
<id>urn:sha1:9e9142249725b4785a01734a8c0f50301fccdea7</id>
<content type='text'>
* doc/lispref/commands.texi (Misc Events): Correctly index
`set-text-conversion-style'.
* lisp/tool-bar.el (tool-bar-event-apply-alt-modifier)
(tool-bar-event-apply-super-modifier)
(tool-bar-event-apply-hyper-modifier)
(tool-bar-event-apply-shift-modifier)
(tool-bar-event-apply-control-modifier)
(tool-bar-event-apply-meta-modifier): Pass t when restoring text
conversion style.
* src/keyboard.c (restore_reading_key_sequence): New function.
(read_key_sequence): Set `reading_key_sequence' where necessary.
* src/keyboard.h: Declare variable.
* src/textconv.c (check_postponed_buffers): New function.
(Fset_text_conversion_style): New argument.  If set, and a key
sequence is being read, postpone resetting the IME until the key
sequence is read.
(syms_of_textconv): Clear new variable and add staticpro.
* src/textconv.h: Update prototypes.
</content>
</entry>
</feed>
