]> git.eshelyaron.com Git - emacs.git/commitdiff
Define completions-highlight face and group
authorJimmy Aguilar Mena <spacibba@aol.com>
Thu, 19 Nov 2020 02:24:48 +0000 (03:24 +0100)
committerJimmy Aguilar Mena <spacibba@aol.com>
Fri, 20 Nov 2020 18:03:23 +0000 (19:03 +0100)
* lisp/completions-highlight.el (completions-highlight) : New face and
group.
(completions-highlight-mode) : Set new face to completions-highlight-overlay.

lisp/completions-highlight.el

index 78017f9662a9452cdcffed43ba091f7bdf3894bb..d310068fd1a4b5711615b7d659134d3da0ba559c 100644 (file)
 (require 'simple)
 (require 'minibuffer)
 
+(defgroup completions-highlight nil
+  "Highlight candidates in completions buffer."
+  :version "28.1"
+  :group 'completion)
+
 (defcustom completions-highlight-autoselect nil
   "Select first candidate without extra tab.
 
@@ -66,9 +71,15 @@ highlight the first candidate in the *Completions* buffer.  When
 the value is non-nil the candidate is selected every time the
 buffer is shown and updated."
   :type 'boolean
-  :group 'completion
+  :group 'completions-highlight
   :version "28.1")
 
+(defface completions-highlight
+  '((t :inherit highlight :extend t))
+  "Default face for highlighting the current line in Hl-Line mode."
+  :version "28.1"
+  :group 'completions-highlight)
+
 (defvar completions-highlight-overlay (make-overlay 0 0)
   "Overlay to use when `completion-highlight-mode' is enabled.")
 
@@ -300,7 +311,7 @@ It is called when showing the *Completions* buffer."
 
   (if completions-highlight-mode
       (progn
-       (overlay-put completions-highlight-overlay 'face 'highlight)
+        (overlay-put completions-highlight-overlay 'face 'completions-highlight)
 
         (setq minibuffer-tab-through-completions-function-save
              minibuffer-tab-through-completions-function)