[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 19da602: Fix input method translation near read-only text
From: |
Eli Zaretskii |
Subject: |
emacs-27 19da602: Fix input method translation near read-only text |
Date: |
Sat, 14 Nov 2020 08:21:34 -0500 (EST) |
branch: emacs-27
commit 19da602991538e03648a82214cbb1bcc9a6ec14a
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix input method translation near read-only text
* lisp/international/quail.el (quail-input-method): Don't disable
input method when the character after point has the read-only
property. Suggested by Evgeny Zajcev <lg.zevlg@gmail.com>
(Bug#44466)
* doc/emacs/mule.texi (Input Methods): Document that input methods
are inhibited in read-only text.
---
doc/emacs/mule.texi | 6 ++++++
lisp/international/quail.el | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 0f07d28..3421ce6 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -563,6 +563,12 @@ method's keys by defining key bindings in the keymap
returned by the
function @code{quail-translation-keymap}, using @code{define-key}.
@xref{Init Rebinding}.
+ Input methods are inhibited when the text in the buffer is read-only
+for some reason. This is so single-character key bindings work in
+modes that make buffer text or parts of it read-only, such as
+@code{read-only-mode} and @code{image-mode}, even when an input method
+is active.
+
Another facility for typing characters not on your keyboard is by
using @kbd{C-x 8 @key{RET}} (@code{insert-char}) to insert a single
character based on its Unicode name or code-point; see @ref{Inserting
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 3299cc5..63371bc 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1330,7 +1330,8 @@ If STR has `advice' text property, append the following
special event:
(defun quail-input-method (key)
(if (or (and (or buffer-read-only
- (get-char-property (point) 'read-only))
+ (and (get-char-property (point) 'read-only)
+ (get-char-property (point) 'front-sticky)))
(not (or inhibit-read-only
(get-char-property (point) 'inhibit-read-only))))
(and overriding-terminal-local-map
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-27 19da602: Fix input method translation near read-only text,
Eli Zaretskii <=