diff options
author | Thanos Apollo <[email protected]> | 2024-01-09 20:36:51 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-09 20:36:51 +0200 |
commit | f7c21d066267c3994f70e335281d1a439a351e6e (patch) | |
tree | e1806cb5109160e0fc33a0a27e0a4425b92e6540 | |
parent | 27b94d889ea850e5c81dcbec3d7f7cbb6e8d83d4 (diff) |
Add yeetube-propertize-vector
Will be used to propertize items in tabulated-list
-rw-r--r-- | yeetube.el | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -371,8 +371,16 @@ prompt blank to keep the default name." (setf download-counter (1+ download-counter)) (yeetube-download--ytdlp url name yeetube-download-audio-format))))) -;; Yeetube Mode +(defun yeetube-propertize-vector (content &rest fields-face-pairs) + "Create a vector with each item propertized with its corresponding face. + +CONTENT is a list of strings. +FIELDS-FACE-PAIRS is a list of fields and faces." + (apply #'vector + (cl-loop for (field face) on fields-face-pairs by #'cddr + collect (propertize (cl-getf content field) 'face face)))) +;; Yeetube Mode (defvar-keymap yeetube-mode-map :doc "Keymap for yeetube commands" "RET" #'yeetube-play |