View | Details | Raw Unified | Return to bug 247248 | Differences between
and this patch

Collapse All | Expand All

(-)b/editors/emacs/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	emacs
4
PORTNAME=	emacs
5
DISTVERSION=	26.3
5
DISTVERSION=	26.3
6
PORTREVISION=	4
6
PORTREVISION=	5
7
PORTEPOCH=	3
7
PORTEPOCH=	3
8
CATEGORIES=	editors
8
CATEGORIES=	editors
9
MASTER_SITES=	GNU
9
MASTER_SITES=	GNU
(-)b/editors/emacs/files/patch-tty-rgb (+31 lines)
Added Link Here
1
Add RGB fallback if environment has COLORTERM=truecolor
2
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41846
3
4
--- doc/misc/efaq.texi.orig	2019-01-07 14:26:06 UTC
5
+++ doc/misc/efaq.texi
6
@@ -1603,6 +1603,9 @@ Currently there's no standard way to determine whether
7
 supports direct color mode.  If such standard arises later on, support
8
 for @samp{setb24} and @samp{setf24} may be removed.
9
 
10
+If Terminfo database is not available 24-bit direct color mode can
11
+still be enabled by defining @env{COLORTERM} to @samp{truecolor}.
12
+
13
 @node Debugging a customization file
14
 @section How do I debug a @file{.emacs} file?
15
 @cindex Debugging @file{.emacs} file
16
--- src/term.c.orig	2019-01-07 14:26:07 UTC
17
+++ src/term.c
18
@@ -4157,6 +4157,13 @@ use the Bourne shell command 'TERM=...; export TERM' (
19
 	    tty->TS_set_background = bg;
20
 	    tty->TN_max_colors = 16777216;
21
 	  }
22
+	/* Fall back to xterm+direct (semicolon version) if requested by COLORTERM */
23
+	else if ((bg = getenv("COLORTERM")) != NULL && !strcasecmp(bg, "truecolor"))
24
+	  {
25
+	    tty->TS_set_foreground = "\033[%?%p1%{8}%<%t3%p1%d%e38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
26
+	    tty->TS_set_background = "\033[%?%p1%{8}%<%t4%p1%d%e48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
27
+	    tty->TN_max_colors = 16777216;
28
+	  }
29
       }
30
 #endif
31
 

Return to bug 247248