diff options
| author | Po Lu | 2023-02-15 22:51:44 +0800 |
|---|---|---|
| committer | Po Lu | 2023-02-15 22:51:44 +0800 |
| commit | cf24b61985c26cbf2e5a24cb0b64a8528aa3a9cc (patch) | |
| tree | b69f8dbb50e3e2f6f09caa05aecbee5241876f62 /src/textconv.h | |
| parent | dd7066901f67233c09f3b0409a57db7686c7ea5b (diff) | |
| download | emacs-cf24b61985c26cbf2e5a24cb0b64a8528aa3a9cc.tar.gz emacs-cf24b61985c26cbf2e5a24cb0b64a8528aa3a9cc.zip | |
Update Android port
* doc/emacs/input.texi (On-Screen Keyboards):
* doc/lispref/commands.texi (Misc Events): Improve documentation
of text conversion stuff.
* java/org/gnu/emacs/EmacsInputConnection.java (beginBatchEdit)
(endBatchEdit, commitCompletion, commitText, deleteSurroundingText)
(finishComposingText, getSelectedText, getTextAfterCursor)
(EmacsInputConnection, setComposingRegion, performEditorAction)
(getExtractedText): Condition debug code on DEBUG_IC.
* java/org/gnu/emacs/EmacsService.java (EmacsService, updateIC):
Likewise.
* lisp/bindings.el (global-map):
* lisp/electric.el (global-map): Make `text-conversion'
`analyze-text-conversion'.
* lisp/progmodes/prog-mode.el (prog-mode): Enable text
conversion in input methods.
* lisp/simple.el (analyze-text-conversion): New function.
* lisp/textmodes/text-mode.el (text-conversion-style)
(text-mode): Likewise.
* src/androidterm.c (android_handle_ime_event): Handle
set_point_and_mark.
(android_sync_edit): Give Emacs 100 ms instead.
(android_perform_conversion_query): Skip the active region, not
the conversion region.
(getSelectedText): Implement properly.
(android_update_selection): Expose mark to input methods.
(android_reset_conversion): Handle `text-conversion-style'.
* src/buffer.c (init_buffer_once, syms_of_buffer): Add buffer
local variable `text-conversion-style'.
* src/buffer.h (struct buffer, bset_text_conversion_style): New
fields.
* src/emacs.c (android_emacs_init): Call syms_of_textconv.
* src/frame.h (enum text_conversion_operation): Rename
TEXTCONV_SET_POINT.
* src/lisp.h: Export syms_of_textconv.
* src/marker.c (set_marker_internal): Force redisplay when the
mark is set and the buffer is visible on builds that use text
conversion. Explain why.
* src/textconv.c (copy_buffer): Fix copying past gap.
(get_mark): New function.
(textconv_query): Implement new flag.
(sync_overlay): New function. Display conversion text in an
overlay.
(record_buffer_change, really_commit_text)
(really_set_composing_text, really_set_composing_region)
(really_delete_surrounding_text, really_set_point)
(handle_pending_conversion_events_1, decrement_inside)
(handle_pending_conversion_events, textconv_set_point)
(get_extracted_text, register_textconv_interface): Various fixes
and improvements.
* src/textconv.h (struct textconv_interface): Update
documentation.
* src/window.h (GCALIGNED_STRUCT): New field `prev_mark'.
* src/xdisp.c (mark_window_display_accurate_1): Handle
prev_mark.
Diffstat (limited to 'src/textconv.h')
| -rw-r--r-- | src/textconv.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/textconv.h b/src/textconv.h index ce003847637..034c663521a 100644 --- a/src/textconv.h +++ b/src/textconv.h | |||
| @@ -35,9 +35,10 @@ struct textconv_interface | |||
| 35 | unexpected buffer change occurs.) */ | 35 | unexpected buffer change occurs.) */ |
| 36 | void (*reset) (struct frame *); | 36 | void (*reset) (struct frame *); |
| 37 | 37 | ||
| 38 | /* Notice that point has moved in the specified frame's selected | 38 | /* Notice that point or mark has moved in the specified frame's |
| 39 | window's selected buffer. The second argument is the window | 39 | selected window's selected buffer. The second argument is the |
| 40 | whose point changed, and the third argument is the buffer. */ | 40 | window whose point changed, and the third argument is the |
| 41 | buffer. */ | ||
| 41 | void (*point_changed) (struct frame *, struct window *, | 42 | void (*point_changed) (struct frame *, struct window *, |
| 42 | struct buffer *); | 43 | struct buffer *); |
| 43 | 44 | ||
| @@ -118,6 +119,7 @@ struct textconv_callback_struct | |||
| 118 | }; | 119 | }; |
| 119 | 120 | ||
| 120 | #define TEXTCONV_SKIP_CONVERSION_REGION (1 << 0) | 121 | #define TEXTCONV_SKIP_CONVERSION_REGION (1 << 0) |
| 122 | #define TEXTCONV_SKIP_ACTIVE_REGION (1 << 1) | ||
| 121 | 123 | ||
| 122 | extern int textconv_query (struct frame *, struct textconv_callback_struct *, | 124 | extern int textconv_query (struct frame *, struct textconv_callback_struct *, |
| 123 | int); | 125 | int); |
| @@ -132,7 +134,8 @@ extern void set_composing_text (struct frame *, Lisp_Object, | |||
| 132 | ptrdiff_t, unsigned long); | 134 | ptrdiff_t, unsigned long); |
| 133 | extern void set_composing_region (struct frame *, ptrdiff_t, ptrdiff_t, | 135 | extern void set_composing_region (struct frame *, ptrdiff_t, ptrdiff_t, |
| 134 | unsigned long); | 136 | unsigned long); |
| 135 | extern void textconv_set_point (struct frame *, ptrdiff_t, unsigned long); | 137 | extern void textconv_set_point_and_mark (struct frame *, ptrdiff_t, |
| 138 | ptrdiff_t, unsigned long); | ||
| 136 | extern void delete_surrounding_text (struct frame *, ptrdiff_t, | 139 | extern void delete_surrounding_text (struct frame *, ptrdiff_t, |
| 137 | ptrdiff_t, unsigned long); | 140 | ptrdiff_t, unsigned long); |
| 138 | extern char *get_extracted_text (struct frame *, ptrdiff_t, ptrdiff_t *, | 141 | extern char *get_extracted_text (struct frame *, ptrdiff_t, ptrdiff_t *, |