[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark 6683d7023c 3/3: Minor simplification to embark-c
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark 6683d7023c 3/3: Minor simplification to embark-collect-choose |
Date: |
Sat, 19 Feb 2022 12:57:32 -0500 (EST) |
branch: externals/embark
commit 6683d7023c4128b4d62df2df56cdb7168f4844ed
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Minor simplification to embark-collect-choose
The file case is already handled by the target finder. Also, the
target finder already returns the type, it looks nicer to not ignore
it.
---
embark.el | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/embark.el b/embark.el
index faf39d10fc..77bdddf713 100644
--- a/embark.el
+++ b/embark.el
@@ -2654,12 +2654,10 @@ in `find-file') or the command was called with a prefix
argument,
exit the minibuffer.
For other Embark Collect buffers, run the default action on ENTRY."
- (pcase-let ((`(_ ,text ,start . ,end)
+ (pcase-let ((`(,type ,text ,start . ,end)
(save-excursion
(goto-char entry)
(embark-target-collect-candidate))))
- (when (eq embark--type 'file)
- (setq text (abbreviate-file-name (expand-file-name text))))
(if (and (eq embark-collect--kind :completions))
(progn
(select-window (active-minibuffer-window))
@@ -2675,9 +2673,9 @@ For other Embark Collect buffers, run the default action
on ENTRY."
(= (car (embark--boundaries))
(embark--minibuffer-point)))
(exit-minibuffer)))
- (embark--act (embark--default-action embark--type)
+ (embark--act (embark--default-action type)
(list :target text
- :type embark--type
+ :type type
:bounds (cons start end))))))
(embark-define-keymap embark-collect-mode-map