diff options
author | Po Lu <luangruo@yahoo.com> | 2023-02-16 23:57:01 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-02-16 23:57:01 +0800 |
commit | 2dcce30290dc7782e9de3b4adf59f38b42408c98 (patch) | |
tree | 67b79ee1049c8fa31c8fdc2c9c67df77ac4e86ee /lisp/isearch.el | |
parent | cf24b61985c26cbf2e5a24cb0b64a8528aa3a9cc (diff) | |
download | emacs-2dcce30290dc7782e9de3b4adf59f38b42408c98.tar.gz |
Update Android port
* doc/emacs/android.texi (Android Fonts):
* doc/emacs/input.texi (On-Screen Keyboards):
* doc/lispref/commands.texi (Misc Events): Update documentation.
* java/org/gnu/emacs/EmacsInputConnection.java (setSelection):
New function.
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView)
(reconfigureFrontBuffer): Make bitmap references weak
references.
* java/org/gnu/emacs/EmacsView.java (handleDirtyBitmap): Don't
clear surfaceView bitmap.
* lisp/comint.el (comint-mode):
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Improve detection of CJK fonts.
* lisp/isearch.el (set-text-conversion-style): New variable.
(isearch-mode, isearch-done): Save and restore the text
conversion style.
* lisp/minibuffer.el (minibuffer-mode): Set an appropriate text
conversion style.
* lisp/simple.el (analyze-text-conversion): Run
post-self-insert-hook properly.
* lisp/subr.el (read-char-from-minibuffer): Disable text
conversion when reading character.
* src/androidterm.c (show_back_buffer): Don't check that F is
not garbaged.
(android_update_selection, android_reset_conversion): Use the
ephemeral last point and handle text conversion being disabled.
* src/buffer.c (syms_of_buffer): Convert old style DEFVAR.
* src/keyboard.c (kbd_buffer_get_event): Handle text conversion
first.
* src/lisp.h: Update prototypes.
* src/lread.c (read_filtered_event): Temporarily disable text
conversion.
* src/sfnt.c (sfnt_decompose_glyph_1, sfnt_decompose_glyph_2):
New functions.
(sfnt_decompose_glyph, sfnt_decompose_instructed_outline):
Refactor contour decomposition to those two functions.
(main): Update tests.
* src/sfntfont-android.c (system_font_directories): Add empty
field.
(Fandroid_enumerate_fonts, init_sfntfont_android): Enumerate
fonts in a user fonts directory.
* src/sfntfont.c (struct sfnt_font_desc): New field
`num_glyphs'.
(sfnt_enum_font_1): Set num_glyphs and avoid duplicate fonts.
(sfntfont_glyph_valid): New function.
(sfntfont_lookup_char, sfntfont_list_1): Make sure glyphs found
are valid.
* src/textconv.c (sync_overlay, really_commit_text)
(really_set_composing_text, really_set_composing_region)
(really_delete_surrounding_text, really_set_point_and_mark)
(handle_pending_conversion_events_1)
(handle_pending_conversion_events, conversion_disabled_p)
(disable_text_conversion, resume_text_conversion)
(Fset_text_conversion_style, syms_of_textconv): Update to
respect new options.
* src/textconv.h:
* src/window.h (GCALIGNED_STRUCT): New field
`ephemeral_last_point'.
* src/xdisp.c (mark_window_display_accurate_1): Set it.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r-- | lisp/isearch.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 80c7a3b3d3f..a17b22fd627 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -244,6 +244,10 @@ If you use `add-function' to modify this variable, you can use the `isearch-message-prefix' advice property to specify the prefix string displayed in the search message.") +(defvar isearch-text-conversion-style nil + "Value of `text-conversion-style' before Isearch mode +was enabled in this buffer.") + ;; Search ring. (defvar search-ring nil @@ -1221,6 +1225,8 @@ active region is added to the search string." ;; isearch-forward-regexp isearch-backward-regexp) ;; "List of commands for which isearch-mode does not recursive-edit.") +(declare-function set-text-conversion-style "textconv.c") + (defun isearch-mode (forward &optional regexp op-fun recursive-edit regexp-function) "Start Isearch minor mode. It is called by the function `isearch-forward' and other related functions. @@ -1342,6 +1348,13 @@ used to set the value of `isearch-regexp-function'." 'keyboard))) (frame-toggle-on-screen-keyboard (selected-frame) nil)) + ;; Disable text conversion so that isearch can behave correctly. + + (when (fboundp 'set-text-conversion-style) + (setq isearch-text-conversion-style + text-conversion-style) + (set-text-conversion-style nil)) + ;; isearch-mode can be made modal (in the sense of not returning to ;; the calling function until searching is completed) by entering ;; a recursive-edit and exiting it when done isearching. @@ -1475,6 +1488,10 @@ NOPUSH is t and EDIT is t." (setq isearch-tool-bar-old-map nil)) (kill-local-variable 'tool-bar-map)) + ;; Restore the previous text conversion style. + (when (fboundp 'set-text-conversion-style) + (set-text-conversion-style isearch-text-conversion-style)) + (force-mode-line-update) ;; If we ended in the middle of some intangible text, |