unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: 62459@debbugs.gnu.org
Subject: bug#62459: [PATCH] Have Xref inherit input method when reading identifiers
Date: Sun, 26 Mar 2023 11:57:25 +0000	[thread overview]
Message-ID: <87jzz33eu2.fsf@posteo.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Certain languages rely heavily on input methods (two examples I have
encountered are APL and Agda), and the default behaviour of Xref when
prompting an identifier can be annoying since the user is required to
manually enable the input method, if they want to look up an identifier
that contains "non-ASCII" characters.  For that reason I think it should
be OK to set the INHERIT-INPUT-METHOD argument when calling
`completing-read'.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] Have Xref inherit input method when reading identifiers --]
[-- Type: text/x-patch, Size: 997 bytes --]

From f640cdc2e4762d8830e860455917e6c2e21e2b4d Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sun, 26 Mar 2023 13:50:27 +0200
Subject: [PATCH] Have Xref inherit input method when reading identifiers

* lisp/progmodes/xref.el (xref--read-identifier): Set
INHERIT-INPUT-METHOD flag to non-nil.
---
 lisp/progmodes/xref.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 1ae60796601..d77024136d0 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1525,7 +1525,7 @@ xref--read-identifier
                        prompt))
                    (xref-backend-identifier-completion-table backend)
                    nil nil nil
-                   'xref--read-identifier-history def)))
+                   'xref--read-identifier-history def t)))
              (if (equal id "")
                  (or def (user-error "There is no default identifier"))
                id)))
-- 
2.30.2


[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


-- 
Philip Kaludercic

             reply	other threads:[~2023-03-26 11:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 11:57 Philip Kaludercic [this message]
2023-03-26 19:04 ` bug#62459: [PATCH] Have Xref inherit input method when reading identifiers Dmitry Gutov
2023-03-26 22:05   ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzz33eu2.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=62459@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).