emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add completion to compilation-read-command


From: Juri Linkov
Subject: Re: Add completion to compilation-read-command
Date: Wed, 25 Dec 2024 19:32:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

> -(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-command-with-completion (command)
> +  (completing-read "Compile command: " compile-history
> +                   nil nil command
> +                   (if (equal (car compile-history) command)
> +                       '(compile-history . 1)
> +                     'compile-history)))

Thanks.  The only problem I see is that the function name
doesn't indicate that it's completing on compile-history.
Probably a better name would be:

  compilation-read-command-with-history-completion



reply via email to

[Prev in Thread] Current Thread [Next in Thread]