From 561a9fa45b4fe35809b0bec17147e17c027092ac Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 23 Aug 2023 22:31:07 +0300 Subject: [PATCH] refactor(emacs-pkgs/term-switcher): un-dash term-switcher.el The builtin `seq' has everything I need, and this way bpalmer will be less annoyed. Change-Id: Ic8e5ac07d5214f36d77e9b577a3f805cdf89f220 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9146 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tools/emacs-pkgs/term-switcher/term-switcher.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/emacs-pkgs/term-switcher/term-switcher.el b/tools/emacs-pkgs/term-switcher/term-switcher.el index 9effac051..76c756f73 100644 --- a/tools/emacs-pkgs/term-switcher/term-switcher.el +++ b/tools/emacs-pkgs/term-switcher/term-switcher.el @@ -5,16 +5,16 @@ ;; ;; Author: Vincent Ambo ;; Version: 1.1 -;; Package-Requires: (dash ivy s vterm) +;; Package-Requires: (ivy s vterm) ;; ;;; Commentary: ;; ;; This package adds a function that lets users quickly switch between ;; different open vterms via ivy. -(require 'dash) (require 'ivy) (require 's) +(require 'seq) (require 'vterm) (defgroup term-switcher nil @@ -45,11 +45,11 @@ "Switch to an existing vterm buffer or create a new one." (interactive) - (let ((terms (-map (lambda (b) (cons (buffer-name b) b)) - (-filter #'ts/is-vterm-buffer (buffer-list))))) + (let ((terms (seq-map (lambda (b) (cons (buffer-name b) b)) + (seq-filter #'ts/is-vterm-buffer (buffer-list))))) (if terms (ivy-read "Switch to vterm: " - (cons "New vterm" (-map #'car terms)) + (cons "New vterm" (seq-map #'car terms)) :caller 'ts/switch-to-terminal :preselect (s-concat "^" term-switcher-buffer-prefix) :require-match t