GNU bug report logs - #50067
Context menus

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 15 Aug 2021 08:52:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>
Cc: alan <at> idiocy.org, mattiase <at> acm.org, homeros.misasa <at> gmail.com, tkk <at> misasa.okayama-u.ac.jp, larsi <at> gnus.org, 50067 <at> debbugs.gnu.org
Subject: bug#50067: Context menus
Date: Wed, 1 Sep 2021 22:03:13 +0300
On 01.09.2021 10:08, Juri Linkov wrote:
> BTW, I'm testing compilation errors/warnings on xref context menu,
> and it reposts this warning:
> 
>    prog-mode.el:60:12: Warning: the function `xref-backend-identifier-at-point'
>        is not known to be defined.
> 
> on this code:
> 
>    (defun prog-context-menu (menu)
>      (require 'xref)
>      (define-key-after menu [prog-separator] menu-bar-separator
>        'mark-whole-buffer)
>      (when (save-excursion
>              (mouse-set-point last-input-event)
>              (xref-backend-identifier-at-point
>               (xref-find-backend)))
>        (define-key-after menu [xref-find-def]
>          '(menu-item "Find Definition" xref-find-definitions-at-mouse
>                      :help "Find definition of identifier")
>          'prog-separator))
> 
> Maybe `xref-backend-identifier-at-point' should be autoloaded?

I don't know. What are the rules?

There is no risk to call it before xref.el is loaded because 
xref-find-backend itself is autoloaded.

But the lack of autoloading can cause byte-compilation warnings. They 
can be dealt with by other means too, though.




This bug report was last modified 3 years and 172 days ago.

Previous Next


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