From 137b554e156392c8393d67bbeabb8cb616b34bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= Date: Wed, 5 Mar 2025 18:30:36 -0600 Subject: Revert `colorful-color-name-font-lock-keywords' changes. Revert temporally changes made to `colorful-color-name-font-lock-keywords', and fix byte-compile warning. --- colorful-mode.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/colorful-mode.el b/colorful-mode.el index b62ff9c..ec00966 100644 --- a/colorful-mode.el +++ b/colorful-mode.el @@ -361,7 +361,7 @@ Only relevant if `colorful-use-prefix' is non-nil." (defcustom colorful-prefix-alignment 'left "The position to place the prefix string. -The value can be 'left or 'right. +The value can be `left' or `right'. Only relevant if `colorful-use-prefix' is non-nil." :type '(choice (const :tag "Left" left) (const :tag "Right" right))) @@ -384,7 +384,7 @@ specification (#RRGGBB[AA]) and can make them inaccurate." (defcustom colorful-only-strings nil "If non-nil, colorful will only highlight colors inside strings. -If set to 'only-prog, only highlight colors in strings if the current +If set to `only-prog', only highlight colors in strings if the current major mode is derived from `prog-mode'." :type '(choice boolean (const :tag "Only in prog-modes" only-prog))) @@ -883,14 +883,10 @@ This is intended to be used with `colorful-extra-color-keyword-functions'." ;;; Color names (defvar colorful-color-name-font-lock-keywords - `((,(lambda (limit) - (let ((case-fold-search t)) - (re-search-forward - (regexp-opt (append - (defined-colors) - (mapcar #'car colorful-html-colors-alist)) - 'symbols) - limit t))) + `((,(regexp-opt (append + (defined-colors) + (mapcar #'car colorful-html-colors-alist)) + 'symbols) (0 (colorful--colorize 'color-name)))) "Font-lock keywords to add color names.") -- cgit v1.0