emacs-devel
[Top][All Lists]
Advanced

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

Re: master 6b7ff60a5e7: Highlight the suffix in *Completions* buffer in


From: Juri Linkov
Subject: Re: master 6b7ff60a5e7: Highlight the suffix in *Completions* buffer in 'basic' style too
Date: Fri, 14 Jun 2024 09:10:40 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> Something like the following should fix this issue:
> [...]
> @@ -3816,7 +3816,9 @@ completion-basic-all-completions
>                              'point
>                              (substring afterpoint 0 (cdr bounds)))))
>           (all (completion-pcm--all-completions prefix pattern table pred)))
> -    (completion-pcm--hilit-commonality pattern all)))
> +    (when all
> +      (nconc (completion-pcm--hilit-commonality pattern all)
> +             (car bounds)))))

This fixes file name completion, but at the cost of breaking icomplete-mode:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  >(19 nil)
  (if (> (length string) pos) (add-face-text-property pos (1+ pos) 
'completions-first-difference nil string))
  (let* ((md (and regexp (string-match regexp string) (cdr (cdr (match-data 
t))))) ...)
  completion--hilit-from-re("it-window-to-buffer" "\\`f\\(.*?\\)" 1)
  completion-lazy-hilit("it-window-to-buffer")
  icomplete-completions("f" ...)
  icomplete-exhibit()
  completing-read-default("M-x " ...)
  read-extended-command-1("M-x " nil)
  read-extended-command()
  command-execute(execute-extended-command)



reply via email to

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