[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/marginalia 376ccc5 048/241: Revert "fix marginalia--ful
From: |
Stefan Monnier |
Subject: |
[elpa] externals/marginalia 376ccc5 048/241: Revert "fix marginalia--full-candidate for selectrum" |
Date: |
Fri, 28 May 2021 20:48:54 -0400 (EDT) |
branch: externals/marginalia
commit 376ccc548f56c2a9d086814231337b5a7198bea3
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Revert "fix marginalia--full-candidate for selectrum"
This reverts commit f39556bb45e0affd23da2b7b8c6841f68648fb7f.
---
marginalia.el | 36 ++++++++++++++----------------------
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/marginalia.el b/marginalia.el
index 539f598..5215762 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -318,28 +318,20 @@ component of a full file path.
This function returns what would be the minibuffer contents after
using `minibuffer-force-complete' on the candidate CAND."
- (or
- ;; Selectrum allows access to the full-candidate via property
- ;; TODO The generic method which follows, does not work yet with selectrum.
- ;; https://github.com/raxod502/selectrum/issues/255
- (get-text-property 0 'selectrum-candidate-full cand)
-
- ;; When in the minibuffer, use the minibuffer contents to expand the
candidate.
- (and (minibufferp)
- (let* ((contents (minibuffer-contents))
- (pt (- (point) (minibuffer-prompt-end)))
- (bounds (completion-boundaries
- (substring contents 0 pt)
- minibuffer-completion-table
- minibuffer-completion-predicate
- (substring contents pt))))
- (concat (substring contents 0 (car bounds))
- cand
- (substring contents (+ pt (cdr bounds))))))
-
- ;; Not in a minibuffer, trust that cand already conveys all
- ;; information, since there is nothing we can do.
- cand))
+ (if (minibufferp)
+ (let* ((contents (minibuffer-contents))
+ (pt (- (point) (minibuffer-prompt-end)))
+ (bounds (completion-boundaries
+ (substring contents 0 pt)
+ minibuffer-completion-table
+ minibuffer-completion-predicate
+ (substring contents pt))))
+ (concat (substring contents 0 (car bounds))
+ cand
+ (substring contents (+ pt (cdr bounds)))))
+ ;; not in a minibuffer, trust that cand already conveys all
+ ;; necessary information (there's not much else we can do)
+ cand))
(defun marginalia-annotate-file (cand)
"Annotate file CAND with its size and modification time."
- [elpa] externals/marginalia e2af1d3 019/241: Make marginalia-prompt-categories an alist of regexps and categories, (continued)
- [elpa] externals/marginalia e2af1d3 019/241: Make marginalia-prompt-categories an alist of regexps and categories, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 1c8ef02 020/241: Remove unused marginalia--metadata function, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia c05face 042/241: Improve marginalia-toggle-annotators if invoked from minibuffer, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 59d65af 018/241: Add basic classifiers: orginal category, symbols, by words in prompt, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 0f1e763 025/241: rename some variables for consistency, update readme, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia cd95c65 028/241: buffer annotation: add read-only status, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 675e680 036/241: improve annotator defcustoms, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 8be2daf 046/241: marginalia-annotate-file: remove unnecessary offset which only costs space for no reason, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia c8c3f87 045/241: Rename toggle -> cycle, improve documenation, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 1269445 049/241: marginalia-annotate-command-binding: cache key binding, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 376ccc5 048/241: Revert "fix marginalia--full-candidate for selectrum",
Stefan Monnier <=
- [elpa] externals/marginalia ccefc57 052/241: marginalia-annotate-command-binding: add comment, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 597186d 065/241: add marginalia-annotate-minor-mode, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 14dce57 062/241: scale field widths such that annotations look better on smaller windows, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 7d3719d 074/241: Fix advice skipping regexp for older Emacsen, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 5373a26 076/241: add marginalia-modified face, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia c0460b6 085/241: classify environment variable, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 9d2f319 080/241: marginalia-annotate-variable: add modification indicator, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 9f1b63b 086/241: add symbol class characters from Emacs 28, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 74603c0 091/241: use mapatoms to fix the harmless unused variable warning, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 88ba686 090/241: remove unnecessary :group specification, Stefan Monnier, 2021/05/28