bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25575: Make ido respect completions-common-part face


From: Luis Gerhorst
Subject: bug#25575: Make ido respect completions-common-part face
Date: Sun, 29 Jan 2017 23:22:27 +0100
User-agent: mu4e 0.9.19; emacs 25.1.1

Hi,
This would allow the user to customize the display of the common part of 
completions, e.g. remove the decorators around it and only distinguish it by 
using a different face (which looks much cleaner). Company also display the 
common part this way (see the `company-preview-common` face).

Here's a advice based snippet that does what I want. It does not seem to handle 
colors properly but since completions-common-part just underlines text for me, 
it's ok:

(defun luis-propertize-ido-common-match-string (&rest _)
  (when ido-common-match-string
    (setq ido-common-match-string
          (propertize ido-common-match-string
                      'face 'completions-common-part))))

(defun luis-unpropertize-ido-common-match-string (&rest _)
  (when ido-common-match-string
    (setq ido-common-match-string
          (propertize ido-common-match-string
                      'face nil))))

(advice-add 'ido-completions :before
            #'luis-propertize-ido-common-match-string)
(advice-add 'ido-completions :after
            #'luis-unpropertize-ido-common-match-string)

Best regards,
Luis





reply via email to

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