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

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

bug#19466: 25.0.50; xref-find-def doesn't find C functions


From: Dmitry Gutov
Subject: bug#19466: 25.0.50; xref-find-def doesn't find C functions
Date: Sun, 01 Feb 2015 04:24:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0

On 01/31/2015 10:52 AM, Eli Zaretskii wrote:

I tried that a few days ago, but didn't see any significant changes in
behavior.  I'm probably missing something -- what exactly did you want
me to pay attention to?

What have you tried, exactly?

You should have noticed that `M-.' in emacs-lisp-mode buffers behaves like in other buffers and uses the current tags table (and prompts for it if the tags table hasn't been visited yet).

I've found one caveat now: even though the tags list is not buffer-local (right?), (tags-lazy-completion-table) returns different results in lisp/**/*.el buffers and src/*.c buffers.

`find-tag' completion exhibits the same difference. For instance, calling `M-x find-tag' in src/disp.c, then typing `display_li' and pressing TAB will complete it to `display_line'. No so in lisp/progmodes/etags.el. Doing it in that buffer results in [No match]. However, typing `display_line' fully in either, then pressing RET, brings you to that function's definition. This should be considered a bug, right?

Until it is fixed, to be able to jump to `display_line' from lisp/** buffers, we have to disable the strict matching in `xref--read-identifier'. Please try #41 again with this patch applied:

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 55405b6..f550282 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -562,7 +562,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
     (cond ((or current-prefix-arg (not id))
            (completing-read prompt
(funcall xref-identifier-completion-table-function)
-                            nil t id
+                            nil nil id
                             'xref--read-identifier-history))
           (t id))))







reply via email to

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