mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Update Android port
* doc/emacs/input.texi (On-Screen Keyboards): Document `touch-screen-always-display'. * doc/lispref/commands.texi (Misc Events): Improve documentation of text conversion events. * java/org/gnu/emacs/EmacsDialog.java (toAlertDialog, display1): Reorder buttons to make more sense. * lisp/elec-pair.el (electric-pair-analyze-conversion): New function. * lisp/simple.el (analyze-text-conversion): Improve integration with electric pair modes. * lisp/term.el (term-mode): Always display the onscreen keyboard. * lisp/touch-screen.el (touch-screen-display-keyboard) (touch-screen-handle-point-up): Respect new options. * src/textconv.c (really_set_composing_text): Stop widenining unnecessarily. (really_delete_surrounding_text): Really delete surrounding text. Give text conversion analyzers the buffer text. (syms_of_textconv): Update doc string.
This commit is contained in:
parent
fa1b27930e
commit
a61f9cb77c
8 changed files with 124 additions and 51 deletions
|
|
@ -162,6 +162,20 @@ Before attempting a skip, if `electric-pair-skip-whitespace' is
|
|||
non-nil, this function is called. It move point to a new buffer
|
||||
position, presumably skipping only whitespace in between.")
|
||||
|
||||
(defun electric-pair-analyze-conversion (string)
|
||||
"Notice that STRING has been deleted by an input method.
|
||||
If the last character of STRING is an electric pair character,
|
||||
and the character after point is too, then delete that other
|
||||
character."
|
||||
(let* ((prev (aref string (1- (length string))))
|
||||
(next (char-after))
|
||||
(syntax-info (electric-pair-syntax-info prev))
|
||||
(syntax (car syntax-info))
|
||||
(pair (cadr syntax-info)))
|
||||
(when (and next pair (memq syntax '(?\( ?\" ?\$))
|
||||
(eq pair next))
|
||||
(delete-char 1))))
|
||||
|
||||
(defun electric-pair--skip-whitespace ()
|
||||
"Skip whitespace forward, not crossing comment or string boundaries."
|
||||
(let ((saved (point))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue