Skip to content

Commit

Permalink
refactor: rename catppuccin-get-color to catppuccin-color
Browse files Browse the repository at this point in the history
Adhere to Emacs naming conventions.
  • Loading branch information
jtbx committed Aug 13, 2024
1 parent 8affab8 commit e9ed1ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion catppuccin-theme.el
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,16 @@ or `mocha'."
(interactive "SChange color: \nsSet %s to: ")
(setcdr (assoc color (symbol-value (intern-soft (concat "catppuccin-" (symbol-name (or flavor catppuccin-flavor)) "-colors")))) value))

(defun catppuccin-get-color (color &optional flavor)
(defun catppuccin-color (color &optional flavor)
"Get the COLOR of FLAVOR or the current flavor."
(interactive "SColor: ")
(let ((result (alist-get color (symbol-value (intern-soft (concat "catppuccin-" (symbol-name (or flavor catppuccin-flavor)) "-colors"))))))
(if (called-interactively-p 'interactive)
(message result)
result)))

(defalias 'catppuccin-get-color 'catppuccin-color)

;;; Theme definition:

(let
Expand Down

0 comments on commit e9ed1ec

Please sign in to comment.