From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: [PATCH] check read-only char property to bypass input-method translation Date: Wed, 4 Sep 2019 18:09:55 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b0074b0591bb9954" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="198789"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 04 17:10:49 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i5Wvo-000paW-Px for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2019 17:10:48 +0200 Original-Received: from localhost ([::1]:34252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Wvn-0001jq-Ju for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2019 11:10:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56958) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5WvH-0001iM-QA for emacs-devel@gnu.org; Wed, 04 Sep 2019 11:10:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5WvF-0000Ar-NO for emacs-devel@gnu.org; Wed, 04 Sep 2019 11:10:15 -0400 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:42329) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5WvC-00008r-Cx for emacs-devel@gnu.org; Wed, 04 Sep 2019 11:10:11 -0400 Original-Received: by mail-lf1-x12b.google.com with SMTP id u13so16221514lfm.9 for ; Wed, 04 Sep 2019 08:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=3oSPevg7UmTFgBxWlCwLPK5ECqnnzfR4cwe5jVbGm5w=; b=TgBLj5hoN3UxSQqkpfBEPOZMpR94AbwgFqLWGL9/tGvGdRv84HfY3GPnjf8yaozt+B Gzo9FoUjcP7NPLujtnj3O2hh0/yP+hlx9BYoy1nBvojT8yd1GpsV6yx3P7unxCCWfvlm yWN3edAY1XBDCcS55YgE2EHGHAoWb+5RdESK+vKC2BBVtyRWVS6ruBQfCqtA/SgtsO2Z RtLUaEpEpd6P+TRTS2jsydWs1pL03BU0+OKGmD/nGsACDJ7Le6AAdKP0McpjVAuGg+l8 Odx/hea9cItKCnvHzCLDdi77eAHVliMzyDJ+/utoN8vgCcGT8oAdGsUJMdqXyc7MzzOV WQNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=3oSPevg7UmTFgBxWlCwLPK5ECqnnzfR4cwe5jVbGm5w=; b=VcjQuqU8+uu+cRggEngrlGWkF6zXpiY+idlCiLApL9GJkbRhiFsFvMbSy1dSqXG2cN DPb65mHVoaf8n0dGirVAioaNHGDXvq5K9n1dKwsBkEqDSiP3MAKAQolxD9nQ1MZ7NCrY Q076vL7jZNSRlMut9MbUEE8Reo1D4JORh+jq/IAeOp67nWpQiaYrIQAk2Nf8+v5ZpU8g WrCfdv1CA5STfIMPhLSW7dEXxBovJ6efFiRLJZ1HtaILMD/aaHKx+sTWrGt5NV9bxNzq +jEUmM51CM9WjsKIT2siKb9JvFIDF4qHYgwHa37gh95UPOMGW2DELXM0EaE8XdH2eJjS vONw== X-Gm-Message-State: APjAAAUGu+YsFf1Fdk2RyfJWF7qvJd6dt+t3InShiHozvFcW1Y5c6rTe QofuD8FClgETwapuKzimLkFZOaF8nJte+xp6fukzyW17 X-Google-Smtp-Source: APXvYqzHWhWDWVY9wgvjVkmYU43qw+CaXXuutJi11htRBOZfU0ZIXtGszauZu5e9BzbUcFkWUh10D8wSqUwxKccGzdU= X-Received: by 2002:ac2:4c36:: with SMTP id u22mr24436823lfq.32.1567609806912; Wed, 04 Sep 2019 08:10:06 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::12b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239833 Archived-At: --000000000000b0074b0591bb9954 Content-Type: text/plain; charset="UTF-8" If point is at read-only area (some button with local-map) of writable buffer, input method performs key translation, making button bindings stop working when some input method is activated This patch fixes this, thanks! diff --git a/lisp/international/quail.el b/lisp/international/quail.el index f42b594..e91175f 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1329,7 +1329,8 @@ quail-converting (defvar quail-conversion-str nil) (defun quail-input-method (key) - (if (or (and buffer-read-only + (if (or (and (or buffer-read-only + (get-char-property (point) 'read-only)) (not (or inhibit-read-only (get-char-property (point) 'inhibit-read-only)))) (and overriding-terminal-local-map -- lg --000000000000b0074b0591bb9954 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If point is at read-only area (some button with local= -map) of writable buffer, input method performs key translation, making but= ton bindings stop working when some input method is activated
This patch fixes this, thanks!

diff --git a= /lisp/international/quail.el b/lisp/international/quail.el
index f42b594= ..e91175f 100644
--- a/lisp/international/quail.el
+++ b/lisp/interna= tional/quail.el
@@ -1329,7 +1329,8 @@ quail-converting
=C2=A0(defvar = quail-conversion-str nil)
=C2=A0
=C2=A0(defun quail-input-method (key= )
- =C2=A0(if (or (and buffer-read-only
+ =C2=A0(if (or (and (or buff= er-read-only
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (get-char-property (point) 'read-only))
=C2=A0 =C2=A0 =C2=A0= =C2=A0 (not (or inhibit-read-only
=C2=A0 (get-char-property (point) &= #39;inhibit-read-only))))
=C2=A0 =C2=A0(and overriding-terminal-local-m= ap

--
lg
--000000000000b0074b0591bb9954--