From: Luis Gerhorst <privat@luisgerhorst.de>
To: 25575@debbugs.gnu.org
Subject: bug#25575: Make ido respect completions-common-part face
Date: Sun, 29 Jan 2017 23:22:27 +0100 [thread overview]
Message-ID: <m2d1f55wws.fsf@luiss-imac.speedport_w_921v_1_43_000> (raw)
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
next reply other threads:[~2017-01-29 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-29 22:22 Luis Gerhorst [this message]
2017-02-09 1:23 ` bug#25575: Make ido respect completions-common-part face Dmitry Gutov
2021-02-05 13:26 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2d1f55wws.fsf@luiss-imac.speedport_w_921v_1_43_000 \
--to=privat@luisgerhorst.de \
--cc=25575@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).