aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2009-09-17 23:04:41 +0000
committerJuanma Barranquero2009-09-17 23:04:41 +0000
commit8686ac7162bb6ba995e1c66c08c8815315c1bd60 (patch)
treebfa97d92e97e34af73a424e5547decfe030b73ce
parenta69c67e84f2896613eb4e6848ef844e0a312f8c7 (diff)
downloademacs-8686ac7162bb6ba995e1c66c08c8815315c1bd60.tar.gz
emacs-8686ac7162bb6ba995e1c66c08c8815315c1bd60.zip
The --quick command line option now ignores X resources and Registry settings.
* etc/NEWS: Mention new behavior of -Q and new variable `inhibit-x-resources'. * lisp/startup.el (emacs-quick-startup): Remove variable and all uses. (command-line): Set `inhibit-x-resources' instead. (command-line-1): Use `inhibit-x-resources' instead. * src/emacs.c (inhibit_x_resources): New variable. (main) [HAVE_NS]: Don't process --quick command line option. (syms_of_emacs) <inhibit-x-resources>: DEFVAR_BOOL it. * src/lisp.h (inhibit_x_resources): Declare it extern. * src/w32reg.c (x_get_string_resource): * src/xrdb.c (x_get_string_resource): Obey inhibit_x_resources.
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/startup.el6
-rw-r--r--src/ChangeLog11
-rw-r--r--src/emacs.c12
-rw-r--r--src/lisp.h3
-rw-r--r--src/w32reg.c6
-rw-r--r--src/xrdb.c4
9 files changed, 48 insertions, 10 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 54f15101485..68fcba4ee06 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
12009-09-15 Juanma Barranquero <lekktu@gmail.com>
2
3 * NEWS: Mention new behavior of -Q and new variable
4 `inhibit-x-resources'.
5
12009-09-13 Chong Yidong <cyd@stupidchicken.com> 62009-09-13 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * PROBLEMS: Document Athena/Lucid internationalization 8 * PROBLEMS: Document Athena/Lucid internationalization
diff --git a/etc/NEWS b/etc/NEWS
index c0aa482dc60..ee497b4431b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -38,6 +38,11 @@ world-readable install.
38 38
39* Changes in Emacs 23.2 39* Changes in Emacs 23.2
40 40
41** Command-line option -Q (--quick) now also disables loading X resources.
42On Windows, Registry settings are ignored, though environment variables set
43on the Registry are still honored. The new variable `inhibit-x-resources'
44shows whether X resources were loaded or not.
45
41** New completion-style `initials' to complete M-x lch to list-command-history. 46** New completion-style `initials' to complete M-x lch to list-command-history.
42 47
43** Unibyte sessions are declared obsolete. 48** Unibyte sessions are declared obsolete.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d7882fc348a..d728490a72d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12009-09-17 Juanma Barranquero <lekktu@gmail.com>
2
3 * startup.el (emacs-quick-startup): Remove variable and all uses.
4 (command-line): Set `inhibit-x-resources' instead.
5 (command-line-1): Use `inhibit-x-resources' instead.
6
12009-09-17 Chong Yidong <cyd@stupidchicken.com> 72009-09-17 Chong Yidong <cyd@stupidchicken.com>
2 8
3 * subr.el: Fix last change to avoid using the `unless' macro, 9 * subr.el: Fix last change to avoid using the `unless' macro,
diff --git a/lisp/startup.el b/lisp/startup.el
index 8ce63b3f037..c3cfcdcc56a 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -366,8 +366,6 @@ from being initialized."
366 string) 366 string)
367 :group 'auto-save) 367 :group 'auto-save)
368 368
369(defvar emacs-quick-startup nil)
370
371(defvar emacs-basic-display nil) 369(defvar emacs-basic-display nil)
372 370
373(defvar init-file-debug nil) 371(defvar init-file-debug nil)
@@ -799,7 +797,7 @@ opening the first frame (e.g. open a connection to an X server).")
799 ((member argi '("-Q" "-quick")) 797 ((member argi '("-Q" "-quick"))
800 (setq init-file-user nil 798 (setq init-file-user nil
801 site-run-file nil 799 site-run-file nil
802 emacs-quick-startup t)) 800 inhibit-x-resources t))
803 ((member argi '("-D" "-basic-display")) 801 ((member argi '("-D" "-basic-display"))
804 (setq no-blinking-cursor t 802 (setq no-blinking-cursor t
805 emacs-basic-display t) 803 emacs-basic-display t)
@@ -2274,7 +2272,7 @@ A fancy display is used on graphic displays, normal otherwise."
2274 (if (or inhibit-startup-screen 2272 (if (or inhibit-startup-screen
2275 initial-buffer-choice 2273 initial-buffer-choice
2276 noninteractive 2274 noninteractive
2277 emacs-quick-startup) 2275 inhibit-x-resources)
2278 2276
2279 ;; Not displaying a startup screen. If 3 or more files 2277 ;; Not displaying a startup screen. If 3 or more files
2280 ;; visited, and not all visible, show user what they all are. 2278 ;; visited, and not all visible, show user what they all are.
diff --git a/src/ChangeLog b/src/ChangeLog
index d7d69efac12..a431e5b94f0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
12009-09-17 Juanma Barranquero <lekktu@gmail.com>
2
3 * emacs.c (inhibit_x_resources): New variable.
4 (main) [HAVE_NS]: Don't process --quick command line option.
5 (syms_of_emacs) <inhibit-x-resources>: DEFVAR_BOOL it.
6
7 * lisp.h (inhibit_x_resources): Declare it extern.
8
9 * w32reg.c (x_get_string_resource):
10 * xrdb.c (x_get_string_resource): Obey inhibit_x_resources.
11
12009-09-17 Eli Zaretskii <eliz@gnu.org> 122009-09-17 Eli Zaretskii <eliz@gnu.org>
2 13
3 * Makefile.in (MSDOS_SUPPORT, SOME_MACHINE_LISP): Add 14 * Makefile.in (MSDOS_SUPPORT, SOME_MACHINE_LISP): Add
diff --git a/src/emacs.c b/src/emacs.c
index 2c14be5208e..9538e3cf059 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -239,6 +239,9 @@ int noninteractive;
239 239
240int noninteractive1; 240int noninteractive1;
241 241
242/* Nonzero means Emacs was run in --quick mode. */
243int inhibit_x_resources;
244
242/* Name for the server started by the daemon.*/ 245/* Name for the server started by the daemon.*/
243static char *daemon_name; 246static char *daemon_name;
244 247
@@ -1483,11 +1486,6 @@ main (int argc, char **argv)
1483 ns_no_defaults = 1; 1486 ns_no_defaults = 1;
1484 skip_args--; 1487 skip_args--;
1485 } 1488 }
1486 if (argmatch (argv, argc, "-Q", "--quick", 5, NULL, &skip_args))
1487 {
1488 ns_no_defaults = 1;
1489 skip_args--;
1490 }
1491#ifdef NS_IMPL_COCOA 1489#ifdef NS_IMPL_COCOA
1492 if (skip_args < argc) 1490 if (skip_args < argc)
1493 { 1491 {
@@ -2680,6 +2678,10 @@ was found. */);
2680This is nil during initialization. */); 2678This is nil during initialization. */);
2681 Vafter_init_time = Qnil; 2679 Vafter_init_time = Qnil;
2682 2680
2681 DEFVAR_BOOL ("inhibit-x-resources", &inhibit_x_resources,
2682 doc: /* If non-nil, X resources and Windows Registry settings are not used. */);
2683 inhibit_x_resources = 0;
2684
2683 /* Make sure IS_DAEMON starts up as false. */ 2685 /* Make sure IS_DAEMON starts up as false. */
2684 daemon_pipe[1] = 0; 2686 daemon_pipe[1] = 0;
2685} 2687}
diff --git a/src/lisp.h b/src/lisp.h
index 820c2585976..f837708fea5 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3143,6 +3143,9 @@ void shut_down_emacs P_ ((int, int, Lisp_Object));
3143/* Nonzero means don't do interactive redisplay and don't change tty modes */ 3143/* Nonzero means don't do interactive redisplay and don't change tty modes */
3144extern int noninteractive; 3144extern int noninteractive;
3145 3145
3146/* Nonzero means don't load X resources or Windows Registry settings. */
3147extern int inhibit_x_resources;
3148
3146/* Pipe used to send exit notification to the daemon parent at 3149/* Pipe used to send exit notification to the daemon parent at
3147 startup. */ 3150 startup. */
3148extern int daemon_pipe[2]; 3151extern int daemon_pipe[2];
diff --git a/src/w32reg.c b/src/w32reg.c
index d2330e77a1a..2b5b352c583 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -76,7 +76,7 @@ w32_get_rdb_resource (rdb, resource)
76 return NULL; 76 return NULL;
77} 77}
78 78
79LPBYTE 79static LPBYTE
80w32_get_string_resource (name, class, dwexptype) 80w32_get_string_resource (name, class, dwexptype)
81 char *name, *class; 81 char *name, *class;
82 DWORD dwexptype; 82 DWORD dwexptype;
@@ -160,6 +160,10 @@ x_get_string_resource (rdb, name, class)
160 return resource; 160 return resource;
161 } 161 }
162 162
163 if (inhibit_x_resources)
164 /* --quick was passed, so this is a no-op. */
165 return NULL;
166
163 return (w32_get_string_resource (name, class, REG_SZ)); 167 return (w32_get_string_resource (name, class, REG_SZ));
164} 168}
165 169
diff --git a/src/xrdb.c b/src/xrdb.c
index 0a74c089f75..fac97e4350f 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -693,6 +693,10 @@ x_get_string_resource (rdb, name, class)
693{ 693{
694 XrmValue value; 694 XrmValue value;
695 695
696 if (inhibit_x_resources)
697 /* --quick was passed, so this is a no-op. */
698 return NULL;
699
696 if (x_get_resource (rdb, name, class, x_rm_string, &value)) 700 if (x_get_resource (rdb, name, class, x_rm_string, &value))
697 return (char *) value.addr; 701 return (char *) value.addr;
698 702