bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65058: 30.0.50; `find-function' can find wrong function due to impli


From: Jens Schmidt
Subject: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
Date: Fri, 4 Aug 2023 21:46:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Start from emacs -Q

M-x find-function RET shell-mode RET

Pops you to sh-mode.  Or

M-x find-function RET vc-create-repo RET

Pops to vc-git-create-repo.

Which can be confusing.

Maybe completion in `find-function-read' should be done like this:

diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index bf890fc35a9..d393ccc759a 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -591,7 +591,7 @@ find-function-read
     (list (intern (completing-read
                    (format-prompt "Find %s" symb prompt-type)
                    obarray predicate
-                   t nil nil (and symb (symbol-name symb)))))))
+                   'lambda nil nil (and symb (symbol-name symb)))))))

 (defun find-function-do-it (symbol type switch-fn)
   "Find Emacs Lisp SYMBOL in a buffer and display it.

Ripped the symbol `lambda' from the completion of `load-file', not sure
whether there is any better symbol.

Present in Emacs 29 as well.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]