branch: elpa/racket-mode commit 37f70556fdee8d48c5657aa0063f63a900c7b753 Author: Greg Hendershott <g...@greghendershott.com> Commit: Greg Hendershott <g...@greghendershott.com>
racket-describe completing-read initial/default The completing-read docs say that INITIAL-VALUE is deprecated in favor of supplying DEFAULT. Justification: The user can just M-n to load the value at the prompt from "future history". Although I had started to follow that advice, after dog-fooding this for awhile as a user I've found it annoying. Furthermore, M-n sometimes isn't sufficient to make completion candidates refresh. At least in my experience, with vertico, you also need to C-e to move point to the end. That is /super/ annoying, and probably super confusing to users who aren't me. This commit reverts back to supplying the Racket identifier at point as the INITIAL-INPUT arg to completing-read. --- doc/racket-mode.texi | 29 ++++++----------------------- racket-describe.el | 4 ++-- racket-edit.el | 10 +--------- 3 files changed, 9 insertions(+), 34 deletions(-) diff --git a/doc/racket-mode.texi b/doc/racket-mode.texi index 9c0270bec1..b03fe7a339 100644 --- a/doc/racket-mode.texi +++ b/doc/racket-mode.texi @@ -1069,13 +1069,7 @@ Unfold (show) all test submodules. @kbd{M-x} @code{racket-tidy-requires} -Make a single, sorted ``require'' form. - -The scope of this command is the innermost module around point -- -whether an explicit submodule form or the outermost module for a -file that has a ``#lang'' line. - -Merge all require forms within that module to one form. +Make a single, sorted ``require'' form for each module. Use a single require-spec for each phase-level, sorted in this order: for-syntax, for-template, for-label, for-meta, and @@ -1114,9 +1108,10 @@ errors. @item Only works for requires at the top level of a source file using @end itemize -#lang -- not for requires inside submodule forms. Furthermore, it -is not smart about module+ or module* forms -- it might delete -outer requires that are actually needed by such submodules. +#lang -- not for requires inside submodule forms. Furthermore, +the analysis is not smart about module+ or module* forms -- it +might delete outer requires that are actually needed by such +submodules. See also: @ref{racket-base-requires}. @@ -1153,21 +1148,9 @@ Add a require for an identifier. Useful when you know the name of an export but don't remember from what module it is exported. -1 At the prompt, you may: - -@itemize -@item -Use @kbd{<XF86Forward>} or @kbd{<next>} or @kbd{M-n} to load the identifier at point. -@end itemize -You might also need to @kbd{C-e} or @kbd{<end>} to see candidates. +After you choose an identifier, this command will: @itemize -@item -Or, type anything. - -@item -After you choose, this command will: - @item Insert the identifier at point if not already there. diff --git a/racket-describe.el b/racket-describe.el index fdc67e1636..8503894be4 100644 --- a/racket-describe.el +++ b/racket-describe.el @@ -655,9 +655,9 @@ Return nil or \(term path anchor lib\)." (get-text-property 0 'racket-affix v)))) (prompt "Search Racket documentation: ") (require-match t) - (initial-input nil) + (initial-input (racket--thing-at-point 'symbol t)) (history 'racket-identifier) - (default (racket--thing-at-point 'symbol t)) + (default initial-input) (history-add-new-input nil)) ;we'll add history below (when-let (str (completing-read prompt collection diff --git a/racket-edit.el b/racket-edit.el index 520c0b2de7..b159de480d 100644 --- a/racket-edit.el +++ b/racket-edit.el @@ -232,15 +232,7 @@ module form, meaning the outermost, file module." Useful when you know the name of an export but don't remember from what module it is exported. -1 At the prompt, you may: -\\<minibuffer-local-map> - -- Use \\[next-history-element] to load the identifier at point. -You might also need to \\[move-end-of-line] to see candidates. - -- Or, type anything. - -2. After you choose, this command will: +After you choose an identifier, this command will: - Insert the identifier at point if not already there.