[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 38c90e8 196/395: ivy.el (ivy-switch-buffer-tr
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 38c90e8 196/395: ivy.el (ivy-switch-buffer-transformer): Move ivy-remote logic here |
Date: |
Thu, 25 Feb 2021 08:32:01 -0500 (EST) |
branch: externals/ivy-hydra
commit 38c90e89b46dd9c6c8cc4105934364137e131df9
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy-switch-buffer-transformer): Move ivy-remote logic here
---
ivy.el | 40 ++++++++++++++++------------------------
1 file changed, 16 insertions(+), 24 deletions(-)
diff --git a/ivy.el b/ivy.el
index 3092d5b..bd7a294 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4244,20 +4244,7 @@ If optional argument PREDICATE is non-nil, use it to
test each
possible match. See `all-completions' for further information."
(delete-dups
(nconc
- (mapcar
- (lambda (x)
- (let* ((buf (get-buffer x))
- (dir (buffer-local-value 'default-directory buf))
- (face (if (and dir
- (ignore-errors
- (file-remote-p dir)))
- 'ivy-remote
- (cdr (assq (buffer-local-value 'major-mode buf)
- ivy-switch-buffer-faces-alist)))))
- (if face
- (propertize x 'face face)
- x)))
- (all-completions str #'internal-complete-buffer predicate))
+ (all-completions str #'internal-complete-buffer predicate)
(and virtual
(ivy--virtual-buffers)))))
@@ -4582,16 +4569,21 @@ Skip buffers that match `ivy-ignore-buffers'."
(defun ivy-switch-buffer-transformer (str)
"Transform candidate STR when switching buffers."
- (let ((b (get-buffer str)))
- (if (and b (buffer-file-name b))
- (cond
- ((and (not (ignore-errors (file-remote-p (buffer-file-name b))))
- (not (verify-visited-file-modtime b)))
- (ivy-append-face str 'ivy-modified-outside-buffer))
- ((buffer-modified-p b)
- (ivy-append-face str 'ivy-modified-buffer))
- (t str))
- str)))
+ (let* ((b (get-buffer str))
+ (dir (buffer-local-value 'default-directory b))
+ (mode (buffer-local-value 'major-mode b)))
+ (cond
+ ((and dir (ignore-errors (file-remote-p dir)))
+ (ivy-append-face str 'ivy-remote))
+ ((not (verify-visited-file-modtime b))
+ (ivy-append-face str 'ivy-modified-outside-buffer))
+ ((buffer-modified-p b)
+ (ivy-append-face str 'ivy-modified-buffer))
+ (t
+ (let ((face (cdr (assq mode ivy-switch-buffer-faces-alist))))
+ (if face
+ (ivy-append-face str face)
+ str))))))
(defun ivy-switch-buffer-occur (cands)
"Occur function for `ivy-switch-buffer' using `ibuffer'.
- [elpa] externals/ivy-hydra 32019df 102/395: ivy.el (ivy-read-action-by-key): Allow to read e.g. C-d, (continued)
- [elpa] externals/ivy-hydra 32019df 102/395: ivy.el (ivy-read-action-by-key): Allow to read e.g. C-d, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6941b8a 214/395: Revert ".dir-locals.el (outline-regexp): "^(" is not an outline start", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 93929ec 257/395: * ivy.el (ivy--shorter-matches-first): Simplify, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1b6f3cf 244/395: Improve ivy-switch-buffer-transformer, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 68ce6e6 384/395: Mention caveats for non-exiting commands in manual, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1deef76 394/395: Bump version to point release 0.13.2, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4235010 387/395: Re-revert last change to ivy-update-candidates, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d8ed11e 388/395: Make ivy-switch-buffer-kill respect current predicate, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c1a61dc 084/395: ivy-test.el (ivy-empty-directory-open): Test opening empty directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 316d4dd 232/395: counsel-kmacro: Create actions for cycling the ring and setting a saved counter value., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 38c90e8 196/395: ivy.el (ivy-switch-buffer-transformer): Move ivy-remote logic here,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra fff899a 237/395: counsel.el (counsel--sync-sentinel-on-exit): Try not to reset index to 0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a2c86c0 273/395: ivy.el (ivy-completion-in-region): Fixup, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra da0b272 281/395: ivy.el (ivy--call-marked): Handle alists, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a37ec22 279/395: Revert "ivy.el (ivy--update-minibuffer): don't filter while there's input", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 05d892d 282/395: counsel-grep/ag/rg/pt: use subprocess instead of shell command, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b173441 326/395: Fix for ivy-immediate-done with counsel-M-x, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d539306 307/395: Revert "ivy.el (ivy-display-style): Remove", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1095e42 298/395: ivy.el (ivy-alt-done-functions-alist): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7774867 335/395: Guard against null Org heading, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7b9391f 320/395: ivy-avy.el: Fix typo, Basil L. Contovounesios, 2021/02/25