]> git.eshelyaron.com Git - emacs.git/commit
Auto-adapt completion preview background color
authorEshel Yaron <me@eshelyaron.com>
Thu, 9 Jan 2025 11:22:03 +0000 (12:22 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 9 Jan 2025 11:35:49 +0000 (12:35 +0100)
commit84c7aa3e2a3264f0fc9f5b352e7652f7476cda26
tree4130f7d203fa5144993f4d94939a8a9f74724e47
parent40e1799d8d74984e66ef21f9c758b5fe9d57e9b8
Auto-adapt completion preview background color

Teach Completion Preview mode to automatically remap its
faces such that the background color of the preview overlay
matches the background color of the buffer text that is
being completed.  Crucially, this resolves an issue where
the preview overlay didn't look nice with hl-line-mode on.

Also see related discussion in bug#71282.

* lisp/completion-preview.el
(completion-preview-adapt-background-color): New option.
(completion-preview--bg-color): New function.
(completion-preview--face-remap-cookie-jar): New variable.
(completion-preview--make-overlay): Use them.
lisp/completion-preview.el