|
From: | Stefan Monnier |
Subject: | Re: [Emacs-diffs] master d3233b4: Make filecache use extended completion |
Date: | Sun, 05 Nov 2017 10:05:14 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> + (let* ((completion-list (completion-all-completions > + newstring file-cache-alist nil newpoint)) > + (base-size (cdr (last completion-list)))) > + (when base-size > + (setcdr (last completion-list) nil)) > + (if (> (length completion-list) 1) > + (progn > + (delete-region (- (point-max) (length string)) (point-max)) > + (save-excursion (insert newstring)) > + (forward-char newpoint) > + ;; Add our own setup function to the Completions Buffer > + (let ((completion-setup-hook > + (append completion-setup-hook > + (list > 'file-cache-completion-setup-function)))) > + (with-output-to-temp-buffer file-cache-completions-buffer > + (display-completion-list > + (completion-hilit-commonality completion-list > newpoint))))) IIRC completion-all-completions already returns hilited strings (and done with more care than what completion-hilit-commonality can do). So is this completion-hilit-commonality call still beneficial? Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |