[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/marginalia 863e07b 004/241: experimental: remove select
From: |
Stefan Monnier |
Subject: |
[elpa] externals/marginalia 863e07b 004/241: experimental: remove selectrum-specifics (may not work out!) |
Date: |
Fri, 28 May 2021 20:48:45 -0400 (EDT) |
branch: externals/marginalia
commit 863e07be931d39047d3d043861384262526a9dfa
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
experimental: remove selectrum-specifics (may not work out!)
See https://github.com/raxod502/selectrum/pull/249
---
marginalia.el | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/marginalia.el b/marginalia.el
index 68130d9..f158d22 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -104,7 +104,6 @@ Annotations are only shown if `marginalia-mode' is enabled."
;;;; Pre-declarations for external packages
-(defvar selectrum-highlight-candidates-function)
(defvar package--builtins)
(defvar package-alist)
(defvar package-archive-contents)
@@ -215,9 +214,8 @@ PROP is the property which is looked up."
;; TODO add more category classifiers from Embark
(pcase prop
('annotation-function
- (or (and (not (bound-and-true-p selectrum-mode)) ;; TODO Still using the
selectrum-highlighting function
- (when-let (cat (marginalia--category-type))
- (alist-get cat marginalia-annotate-alist)))
+ (or (when-let (cat (marginalia--category-type))
+ (alist-get cat marginalia-annotate-alist))
(funcall fun metadata prop)))
('category
(or (and marginalia--this-command
@@ -227,19 +225,8 @@ PROP is the property which is looked up."
(defun marginalia--minibuffer-setup ()
"Setup minibuffer for `marginalia-mode'.
-Remember `this-command' for annotation and replace highlighting function."
- (setq-local marginalia--this-command this-command)
- ;; TODO we use selectrum-highlight-candidates-function here because
annotation faces
- ;; are overwritten if we use the Emacs annotation-function with selectrum is
used.
- ;; While this is consistent with the behavior of the Completions buffer, it
is not
- ;; what I want e.g. for marginalia-annotate-face!
- ;; How to proceed?
- ;; See https://github.com/raxod502/selectrum/pull/249
- (when (boundp 'selectrum-highlight-candidates-function)
- (let ((orig selectrum-highlight-candidates-function))
- (setq-local selectrum-highlight-candidates-function
- (lambda (input candidates)
- (marginalia--annotate-candidates (funcall orig input
candidates)))))))
+Remember `this-command' for annotation."
+ (setq-local marginalia--this-command this-command))
(defun marginalia--metadata ()
"Return current minibuffer completion metadata."
- [elpa] branch externals/marginalia created (now 529aee6), Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 84f0fde 002/241: add marginalia-command-annotate, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia eecc6e2 006/241: Get key binding active in next window instead of in the minibuffer, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 863e07b 004/241: experimental: remove selectrum-specifics (may not work out!),
Stefan Monnier <=
- [elpa] externals/marginalia e863b6c 007/241: Show key bindings from minibuffer-selected-window, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 4780a6a 009/241: marginalia works with icomplete-vertical now!, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 237a620 001/241: initial prototype, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia c47576c 010/241: add configuration example, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia a6dfb38 003/241: add todos, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia bdbbee2 005/241: add very basic readme, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 6077206 008/241: Ignore byte-compiled files, autoloads and *-pkg.el files, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 0c090f3 011/241: improve readme, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 80fa320 016/241: Introduce list of classifiers, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia ca21d30 029/241: fix typo in the readme, Stefan Monnier, 2021/05/28