branch: externals/colorful-mode
commit 0f5986b0142d80787cd51a58619612554a780c27
Author: Elijah Gabe P. <eg642...@gmail.com>
Commit: Elijah Gabe P. <eg642...@gmail.com>

    Fix global-colorful-modes (github#13)
    
    * colorful-mode.el
    
    (global-colorful-modes): Add `help-mode' to list
    and remove `mhtml-mode' `html-ts-mode' `latex-mode' from list.
    
    Add compatibility for emacs 30.
---
 colorful-mode.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/colorful-mode.el b/colorful-mode.el
index 86ec3aa6ea..4f89a28691 100644
--- a/colorful-mode.el
+++ b/colorful-mode.el
@@ -763,7 +763,10 @@ This is intended to be used with 
`colorful-extra-color-keyword-functions'."
 ;; Silence a byte-compile warning about global-colorful-modes not
 ;; being defined, if anyone knows why this happens please send a
 ;; patch.
-(defvar global-colorful-modes)
+
+;; NOTE: This bug is already fixed in emacs-30
+(if (< emacs-major-version 30)
+    (defvar global-colorful-modes))
 
 ;;;###autoload
 (defun turn-on-colorful-mode ()
@@ -774,7 +777,7 @@ This is intended to be used with 
`colorful-extra-color-keyword-functions'."
 ;;;###autoload
 (define-globalized-minor-mode global-colorful-mode
   colorful-mode turn-on-colorful-mode
-  :predicate '(mhtml-mode html-ts-mode latex-mode prog-mode))
+  :predicate '(prog-mode help-mode))
 
 
 (provide 'colorful-mode)

Reply via email to