]> git.eshelyaron.com Git - emacs.git/commit
Take fields into account during text conversion
authorPo Lu <luangruo@yahoo.com>
Sun, 21 Apr 2024 13:51:09 +0000 (21:51 +0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 29 Apr 2024 19:48:00 +0000 (21:48 +0200)
commitf6a29cbae34e6a3a918b557a278b79212d3a5314
tree5ec7476c7be13461e59c32af3f6dcad218e6b47d
parentac93d02ffc11f8b5bb28fedee67169805d856c4d
Take fields into account during text conversion

* lisp/cus-edit.el (Custom-mode): Enable text conversion, now
that fields are correctly treated.

* src/alloc.c (mark_frame): Mark f->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->conversion.field.

* src/frame.h (struct text_conversion_state) <field>: 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.

(cherry picked from commit 430088c9ccec5fe9be57d267f45acdc87aa3b28e)
lisp/cus-edit.el
src/alloc.c
src/androidterm.c
src/editfns.c
src/frame.c
src/frame.h
src/lisp.h
src/minibuf.c
src/textconv.c
src/textconv.h