branch: externals/mct commit f051452e17d6e9d793c4682695b14f36ad2eeb74 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Remap hl-line-face, not 'hl-line' face This makes it more robust in case the user changes that customisation option. Though I guess we would be better off using our own overlay for highlighting the current candidate (I still need to figure out how to do that). --- mct.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mct.el b/mct.el index c0aec6f..c0d72a5 100644 --- a/mct.el +++ b/mct.el @@ -249,12 +249,14 @@ Add this to `completion-list-mode-hook'." 'mct-line-number-current-line) (display-line-numbers-mode 1))) +(defvar hl-line-face) + (defun mct--hl-line () "Set up line highlighting for the completions' buffer. Add this to `completion-list-mode-hook'." (when (and (derived-mode-p 'completion-list-mode) (eq mct-completions-format 'one-column)) - (face-remap-add-relative 'hl-line 'mct-hl-line) + (face-remap-add-relative hl-line-face 'mct-hl-line) (hl-line-mode 1))) ;; Thanks to Omar AntolĂn Camarena for recommending the use of