~protesilaos/lin

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

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

Kai von Fintel <fintel@mit.edu>
Details
Message ID
<BB266697-0183-4A42-BF07-F90A6DFD5EE0@mit.edu>
DKIM signature
missing
Download raw message
Patch: +4 -1
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)
Details
Message ID
<875yn53c6c.fsf@protesilaos.com>
In-Reply-To
<BB266697-0183-4A42-BF07-F90A6DFD5EE0@mit.edu> (view parent)
DKIM signature
missing
Download raw message
> From: Kai von Fintel <fintel@mit.edu>
> Date: Mon, 18 Apr 2022 19:24:06 -0400
>
> 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.

Thank you, Kai!  I installed the patch and also updated the manual's
"Acknowledgements" section to include your name.

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)