GNU bug report logs - #9923
24.0.91; `where-is' does not find recentf menu items (cmds, not files)

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 31 Oct 2011 20:30:02 UTC

Severity: minor

Tags: confirmed

Found in versions 24.0.91, 25.2

Full log


Message #78 received at 9923 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 9923 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#9923: 24.0.91; `where-is' does not find recentf menu items
 (cmds, not files)
Date: Mon, 06 Dec 2021 11:28:30 +0200
> I think it would be more "obviously correct" if we switched to
> (window-buffer (posn-window (event-end click))) instead.
>
>>    ;; Include text-mode select menu only in strings and comments.
>> -  (when (nth 8 (save-excursion (syntax-ppss (posn-point (event-end click)))))
>> +  (when (nth 8 (save-excursion
>> +                 (with-current-buffer (window-buffer)
>> +                   (syntax-ppss (posn-point (event-end click))))))
>
> Same here.

Will do this if a simpler solution below is not suitable.

>> +++ b/lisp/help-fns.el
>> @@ -1898,6 +1898,8 @@ help-fns--list-local-commands
>>      (mapatoms
>>       (lambda (sym)
>>         (when (and (commandp sym)
>> +                  ;; Ignore 'ignore'.
>> +                  (not (eq sym 'ignore))
>>                    ;; Ignore aliases.
>>                    (not (symbolp (symbol-function sym)))
>>                    ;; Ignore everything bound.
>
> I'm not sure what to think of this because I don't understand
> its motivation.  IOW at the very least it should come with a comment
> explaining why we need to ignore `ignore`.

The problem is that `describe-mode` calls `context-menu-map`
that it should not do:

  context-menu-map()
  (lambda (_) (context-menu-map))(ignore)
  where-is-internal(ignore nil t)
  help-fns--list-local-commands()
  describe-mode()
  funcall-interactively(describe-mode)
  call-interactively(describe-mode nil nil)
  command-execute(describe-mode)

`context-menu-map' is bound to `ignore', so ignoring `ignore'
will prevent calling it from help-fns--list-local-commands.




This bug report was last modified 91 days ago.

Previous Next


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