emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] icomplete-vertical


From: Juri Linkov
Subject: Re: [PATCH] icomplete-vertical
Date: Tue, 06 Apr 2021 21:49:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Okay.  Here is the final (?) version of the patch; I forgot to update the
> docs in the previous one.

I tried it out, and everything works nicely.
The only problem I see this code is too hackish:

> +(defun icomplete--vertical-reformat-completions ()
> +  "Reformat the completion candidates returned by `icomplete-completions'."
> +  (save-match-data
> +    (setq icomplete-current-completions
> +          (if (string-match "^\\((.*)\\|\\[.*\\]\\)?{\\(\\(?:.\\|\n\\)+\\)}"
> +                            icomplete-current-completions)
> +              (format "%s \n%s"
> +                      (or (match-string 1 icomplete-current-completions) "")
> +                      (match-string 2 icomplete-current-completions))
> +            icomplete-current-completions))))

I guess like there are variables that affect formatting of the output
e.g. 'icomplete-hide-common-prefix', there could be a new similar
variable 'icomplete-add-initial-newline' to add a newline in
the 'icomplete-completions' formatting function.



reply via email to

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