GNU bug report logs - #74615
30.0.92; js-find-symbol automatically activates ido-mode

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sat, 30 Nov 2024 06:38:02 UTC

Severity: normal

Found in version 30.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: 74615 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#74615: 30.0.92; js-find-symbol automatically activates ido-mode
Date: Sat, 30 Nov 2024 07:37:27 +0100
[Message part 1 (text/plain, inline)]
js-find-symbol/js--read-symbol reads a symbol via ido-completing-read
and automatically activates ido-mode. For users of other completion
systems (default completion, Icomplete/Fido, Vertico, Helm, ...) this is
not desired. Icomplete/Fido/Vertico/etc. replace Ido and provide similar
behavior for general completing-read.

Patch attached.

[0001-progmodes-js-Use-completing-read-instead-of-ido-comp.patch (text/x-diff, inline)]
From 3b4ccb677a16fc4934d62fed7e1f01b52399e633 Mon Sep 17 00:00:00 2001
From: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Wed, 1 Mar 2023 19:27:38 +0100
Subject: [PATCH] progmodes/js: Use completing-read instead of
 ido-completing-read

---
 lisp/progmodes/js.el | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index f74b8ab1c46..29566d38109 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -58,11 +58,8 @@
 
 (eval-when-compile
   (require 'cl-lib)
-  (require 'ido)
   (require 'rx))
 
-(defvar ido-cur-list)
-(declare-function ido-mode "ido" (&optional arg))
 (declare-function treesit-parser-create "treesit.c")
 (declare-function treesit-induce-sparse-tree "treesit.c")
 (declare-function treesit-search-subtree "treesit.c")
@@ -3288,11 +3285,7 @@ js--read-symbol
 initial input INITIAL-INPUT.  Return a cons of (SYMBOL-NAME
 . LOCATION), where SYMBOL-NAME is a string and LOCATION is a
 marker."
-  (unless ido-mode
-    (ido-mode 1)
-    (ido-mode -1))
-
-  (let ((choice (ido-completing-read
+  (let ((choice (completing-read
                  prompt
                  (cl-loop for key being the hash-keys of symbols-table
                           collect key)
-- 
2.45.2


This bug report was last modified 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.