-
Notifications
You must be signed in to change notification settings - Fork 13
/
emacs-x-resource-name.patch
91 lines (76 loc) · 3.33 KB
/
emacs-x-resource-name.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
diff --git a/lisp/term/pgtk-win.el b/lisp/term/pgtk-win.el
index 2e03e7f57a5..a816224b703 100644
--- a/lisp/term/pgtk-win.el
+++ b/lisp/term/pgtk-win.el
@@ -116,7 +116,7 @@ DISPLAY is the name of the display Emacs should connect to."
(when (boundp 'x-resource-name)
(unless (stringp x-resource-name)
(let (i)
- (setq x-resource-name (copy-sequence invocation-name))
+ (setq x-resource-name (copy-sequence "emacs"))
;; Change any . or * characters in x-resource-name to hyphens,
;; so as not to choke when we use it in X resource queries.
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 98dd576fea2..ac1fae6d600 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1231,7 +1231,7 @@ This returns an error if any Emacs frames are X frames."
;; Make sure we have a valid resource name.
(or (stringp x-resource-name)
(let (i)
- (setq x-resource-name (copy-sequence invocation-name))
+ (setq x-resource-name (copy-sequence "emacs"))
;; Change any . or * characters in x-resource-name to hyphens,
;; so as not to choke when we use it in X resource queries.
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 5f806e18090..abfc239a2c5 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -155,7 +155,7 @@ pgtk_display_info_for_name (Lisp_Object name)
}
/* Use this general default value to start with. */
- Vx_resource_name = Vinvocation_name;
+ Vx_resource_name = build_string ("emacs");
validate_x_resource_name ();
@@ -1218,7 +1218,7 @@ This function is an internal primitive--use `make-frame' instead. */ )
/* Use this general default value to start with
until we know if this frame has a specified name. */
- Vx_resource_name = Vinvocation_name;
+ Vx_resource_name = build_string("emacs");
display =
gui_display_get_arg (dpyinfo, parms, Qterminal, 0, 0, RES_TYPE_NUMBER);
diff --git a/src/xfns.c b/src/xfns.c
index 5a618908be1..19343ea8f82 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4629,7 +4629,7 @@ This function is an internal primitive--use `make-frame' instead. */)
/* Use this general default value to start with
until we know if this frame has a specified name. */
- Vx_resource_name = Vinvocation_name;
+ Vx_resource_name = build_string ("emacs");
display = gui_display_get_arg (dpyinfo, parms, Qterminal, 0, 0,
RES_TYPE_NUMBER);
@@ -7281,7 +7281,7 @@ x_display_info_for_name (Lisp_Object name)
return dpyinfo;
/* Use this general default value to start with. */
- Vx_resource_name = Vinvocation_name;
+ Vx_resource_name = build_string ("emacs");
validate_x_resource_name ();
diff --git a/src/xterm.c b/src/xterm.c
index 524e2a32574..b30ff50f97c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -29489,7 +29489,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
argv[argc] = 0;
argc = 0;
- argv[argc++] = initial_argv[0];
+ argv[argc++] = "emacs";
if (! NILP (display_name))
{
@@ -29514,6 +29514,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
/* gtk_init does set_locale. Fix locale before and after. */
fixup_locale ();
unrequest_sigio (); /* See comment in x_display_ok. */
+ g_set_prgname ("emacs");
gtk_init (&argc, &argv2);
request_sigio ();