Remove prettify-utils dependency
This commit is contained in:
parent
6490c4b922
commit
6b73f408aa
2 changed files with 10 additions and 6 deletions
|
@ -282,6 +282,15 @@ Use the :iosevka property to enable (or disable) it regardless.")
|
||||||
("<+>" . #Xe1cb)
|
("<+>" . #Xe1cb)
|
||||||
("+>" . #Xe1cc)))))
|
("+>" . #Xe1cc)))))
|
||||||
|
|
||||||
|
(defun +pretty-code--icon-to-char (l)
|
||||||
|
"Borrowed from `prettify-utils'."
|
||||||
|
(let ((glue '(Br . Bl))
|
||||||
|
(head (car l))
|
||||||
|
(tail (cdr l)))
|
||||||
|
(cond ((not (consp l)) '())
|
||||||
|
((not (consp tail)) (list head))
|
||||||
|
((cons head (cons nil (+pretty-code--icon-to-char tail)))))))
|
||||||
|
|
||||||
;;;###autodef
|
;;;###autodef
|
||||||
(defun set-pretty-symbols! (modes &rest plist)
|
(defun set-pretty-symbols! (modes &rest plist)
|
||||||
"Associates string patterns with icons in certain major-modes.
|
"Associates string patterns with icons in certain major-modes.
|
||||||
|
@ -329,7 +338,7 @@ assicated with :lambda in `+pretty-code-symbols'."
|
||||||
(let ((prop (car plist))
|
(let ((prop (car plist))
|
||||||
(sym (cadr plist)))
|
(sym (cadr plist)))
|
||||||
(when-let* ((icon (plist-get +pretty-code-symbols prop)))
|
(when-let* ((icon (plist-get +pretty-code-symbols prop)))
|
||||||
(push (cons sym (prettify-utils-string icon))
|
(push (cons sym (+pretty-code--icon-to-char (append icon nil)))
|
||||||
results))
|
results))
|
||||||
(setq plist (cddr plist))))
|
(setq plist (cddr plist))))
|
||||||
(setq prettify-symbols-alist (append results prettify-symbols-alist))))
|
(setq prettify-symbols-alist (append results prettify-symbols-alist))))
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
|
||||||
;;; ui/pretty-code/packages.el
|
|
||||||
|
|
||||||
(package! prettify-utils
|
|
||||||
:recipe (:fetcher github :repo "Ilazki/prettify-utils.el"))
|
|
Loading…
Add table
Add a link
Reference in a new issue