Visuwesh wrote: > [வியாழன் டிசம்பர் 26, 2024] Spyros Roum wrote: > > I don't really have much to say about the change but: > >> [...] >> I based the entry on a similar entry from a few lines up: >> >>   > *** New user option 'completion-pcm-leading-wildcard'. >>   > This option configures how the partial-completion style does >> completion. >>   > It defaults to nil, which preserves the existing behavior. When it >> is set >>   > to t, the partial-completion style behaves more like the substring >>   > style, in that a string being completed can match against a candidate >>   > anywhere in the candidate string. >> >> If you think however that the options are not necessary, I can keep >> the first sentence only. >> >> Patch attached has the corrected `:version` and ChangeLog, no other >> changes (also rebased to master). >> From fa17714fcb12079bc37e5be54fe6b2a68bcd34ff Mon Sep 17 00:00:00 2001 >> From: Spyros Roum >> Date: Wed, 25 Dec 2024 17:32:31 +0200 >> Subject: [PATCH] Add option for making compilation-read-command use >> completing-read >> [...] >> diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el >> index 6784a12fd63..d0da96069af 100644 >> --- a/lisp/progmodes/compile.el >> +++ b/lisp/progmodes/compile.el >> @@ -1797,12 +1797,38 @@ compilation-mode-font-lock-keywords >> '((compilation--ensure-parse)) >> compilation-mode-font-lock-keywords)) >> >> -(defun compilation-read-command (command) >> +(defun compilation-prompt-read-shell-command (command) >> (read-shell-command "Compile command: " command >> (if (equal (car compile-history) command) >> '(compile-history . 1) >> 'compile-history))) >> >> +(defun compilation-prompt-read-with-history-completion (command) >> + (completing-read "Compile command: " compile-history >> + nil nil command >> + (if (equal (car compile-history) command) >> + '(compile-history . 1) >> + 'compile-history))) >> + >> +(defcustom compilation-read-command-function >> + #'compilation-prompt-read-shell-command >> + "`compilation-read-command' uses this function to get user's input. >> +Defaults to `compilation-prompt-read-shell-command', >> +but 'compilation-prompt-read-with-history-completion' can be used instead for >> +a completing version based on past runs." >> + :version "31.1" >> + :type 'function >> + :options >> + (list >> + #'compilation-prompt-read-shell-command >> + #'compilation-prompt-read-with-history-completion)) > It would be nice to say what these options mean in plain English (with > :tag IIRC). I like this suggestion, and it made me realize that even though I use `:options`, there is no actual list of options in the customization interface, which seems weird. This is what I ended up with after looking at other `defcustom`s. Itworks as expected, showing a values menu and using the `:tag`s for descriptions. However, I do not know what the technical differences are between this and the previous versions and if one is more correct than the other. I am inclined to keep this though since it provides the Values Menu, which is nice.