Skip to content

fix: replace nil with unspecified for :distant-foreground in Emacs 30.2#128

Closed
eliaskanelis wants to merge 1 commit into
oneKelvinSmith:masterfrom
eliaskanelis:master
Closed

fix: replace nil with unspecified for :distant-foreground in Emacs 30.2#128
eliaskanelis wants to merge 1 commit into
oneKelvinSmith:masterfrom
eliaskanelis:master

Conversation

@eliaskanelis

Copy link
Copy Markdown

Fix Emacs 30.2 Compatibility: :distant-foreground nil → unspecified

Problem

Users running Emacs 30.2+ see this warning on startup:

Warning: setting attribute ':distant-foreground' of face 'highlight': 
nil value is invalid, use 'unspecified' instead.

Root Cause

The highlight and lazy-highlight faces in monokai-theme.el set
:distant-foreground to nil, which is no longer valid in Emacs 30.2.
Emacs now requires unspecified for undefined face attributes.

Solution

Replace nil with unspecified for the :distant-foreground attribute in:

  • highlight face (both monokai-class and monokai-256-class)
  • lazy-highlight face (both monokai-class and monokai-256-class)

Changes

  • Lines 433, 435: highlight face - monokai-class
  • Lines 436, 438: highlight face - monokai-256-class
  • Lines 441, 443: lazy-highlight face - monokai-class
  • Lines 444, 446: lazy-highlight face - monokai-256-class

Testing

✅ Tested on Emacs 30.2
✅ No startup warnings
✅ Theme loads correctly

In Emacs 30.2, setting :distant-foreground to nil is invalid and causes
a warning: "Setting attribute ':distant-foreground' of face 'highlight':
nil value is invalid, use 'unspecified' instead."

Replace nil with unspecified in both the highlight and lazy-highlight
faces for both monokai-class and monokai-256-class to comply with Emacs
30.2+ requirements.

Fixes: Warning on startup with Emacs 30.2+
@eliaskanelis

eliaskanelis commented Nov 16, 2025

Copy link
Copy Markdown
Author

Duplicate with #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant