GNU bug report logs -
#72511
30.0.50; prefix-completions is always nil in help--symbol-completion-table
Previous Next
Full log
View this message in rfc822 format
> Cc: 72511 <at> debbugs.gnu.org
> Date: Wed, 14 Aug 2024 11:50:47 -0400
> From: Stefan Monnier via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> > (when help-enable-completion-autoload
> > (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
> > (help--load-prefixes prefixes)))
> > (let ((prefix-completions
> > (and help-enable-completion-autoload
> > (mapcar #'intern (all-completions string definition-prefixes)))))
> >
> > By default, `help-enable-completion-autoload' is t, so this code should
> > normally run. The perceived problem here is that the definition of
> > `help-definition-prefixes' function is as follows:
> >
> > (defun help-definition-prefixes ()
> > "Return the up-to-date radix-tree form of `definition-prefixes'."
> > (when (> (hash-table-count definition-prefixes) 0)
> > (maphash (lambda (prefix files)
> > (let ((old (radix-tree-lookup help-definition-prefixes prefix)))
> > (setq help-definition-prefixes
> > (radix-tree-insert help-definition-prefixes
> > prefix (append old files)))))
> > definition-prefixes)
> > (clrhash definition-prefixes))
> > help-definition-prefixes)
> >
> > Because of the `clrhash', `definition-prefixes' will always be empty
> > after the function call to `help-definition-prefixes'.
>
> Duh, indeed.
> IIRC it's a leftover from some older version of the code.
> I think the patch below is in order.
Thanks, please install on the emacs-30 branch.
This bug report was last modified 1 year and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.