~protesilaos/lin

Make `lin-mac-override(-fg)' work on emacs-mac (Emacs Mac port) v1 APPLIED

Kai von Fintel: 1
 Make `lin-mac-override(-fg)' work on emacs-mac (Emacs Mac port)

 1 files changed, 4 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~protesilaos/lin/patches/31296/mbox | git am -3
Learn more about email & git

[PATCH] Make `lin-mac-override(-fg)' work on emacs-mac (Emacs Mac port) Export this patch

The emacs-mac port of emacs (https://bitbucket.org/mituharu/emacs-mac)
returns a different value for the window system ("mac" instead of
"ns") and its system color specifications have a "mac:" prefix. This
change makes the use of macOS system colors for the lin-highlighting
work in both major kinds of emacs versions on macOS.
---
 lin.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lin.el b/lin.el
index a514796..cf9a391 100644
--- a/lin.el
+++ b/lin.el
@@ -268,12 +268,15 @@ updates the face.  Users who prefer to use `setq' must run
  '((((type ns))
     ;; <https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/color/> .
     :background "selectedContentBackgroundColor" :extend t)
    (((type mac))
     :background "mac:selectedContentBackgroundColor" :extend t)
    (t :inherit lin-blue))
  "Alternative macOS-style face for `lin-face'."
  :group 'lin-faces)

(defface lin-mac-override-fg
  '((t :inherit lin-mac :foreground "alternateSelectedControlTextColor"))
  '((((type ns)) :inherit lin-mac :foreground "alternateSelectedControlTextColor")
    (((type mac)) :inherit lin-mac :foreground "mac:alternateSelectedControlTextColor"))
  "Like `lin-mac' but also sets a foreground."
  :group 'lin-faces)

-- 
2.32.0 (Apple Git-132)
Thank you, Kai!  I installed the patch and also updated the manual's
"Acknowledgements" section to include your name.