diff options
| author | Juanma Barranquero <lekktu@gmail.com> | 2009-09-17 23:04:41 +0000 |
|---|---|---|
| committer | Juanma Barranquero <lekktu@gmail.com> | 2009-09-17 23:04:41 +0000 |
| commit | 8686ac7162bb6ba995e1c66c08c8815315c1bd60 (patch) | |
| tree | bfa97d92e97e34af73a424e5547decfe030b73ce /src | |
| parent | a69c67e84f2896613eb4e6848ef844e0a312f8c7 (diff) | |
| download | emacs-8686ac7162bb6ba995e1c66c08c8815315c1bd60.tar.gz | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/emacs.c | 12 | ||||
| -rw-r--r-- | src/lisp.h | 3 | ||||
| -rw-r--r-- | src/w32reg.c | 6 | ||||
| -rw-r--r-- | src/xrdb.c | 4 |
5 files changed, 30 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d7d69efac12..a431e5b94f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2009-09-17 Juanma Barranquero <lekktu@gmail.com> + + * 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. + + * lisp.h (inhibit_x_resources): Declare it extern. + + * w32reg.c (x_get_string_resource): + * xrdb.c (x_get_string_resource): Obey inhibit_x_resources. + 2009-09-17 Eli Zaretskii <eliz@gnu.org> * 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; int noninteractive1; +/* Nonzero means Emacs was run in --quick mode. */ +int inhibit_x_resources; + /* Name for the server started by the daemon.*/ static char *daemon_name; @@ -1483,11 +1486,6 @@ main (int argc, char **argv) ns_no_defaults = 1; skip_args--; } - if (argmatch (argv, argc, "-Q", "--quick", 5, NULL, &skip_args)) - { - ns_no_defaults = 1; - skip_args--; - } #ifdef NS_IMPL_COCOA if (skip_args < argc) { @@ -2680,6 +2678,10 @@ was found. */); This is nil during initialization. */); Vafter_init_time = Qnil; + DEFVAR_BOOL ("inhibit-x-resources", &inhibit_x_resources, + doc: /* If non-nil, X resources and Windows Registry settings are not used. */); + inhibit_x_resources = 0; + /* Make sure IS_DAEMON starts up as false. */ daemon_pipe[1] = 0; } 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)); /* Nonzero means don't do interactive redisplay and don't change tty modes */ extern int noninteractive; +/* Nonzero means don't load X resources or Windows Registry settings. */ +extern int inhibit_x_resources; + /* Pipe used to send exit notification to the daemon parent at startup. */ extern 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) return NULL; } -LPBYTE +static LPBYTE w32_get_string_resource (name, class, dwexptype) char *name, *class; DWORD dwexptype; @@ -160,6 +160,10 @@ x_get_string_resource (rdb, name, class) return resource; } + if (inhibit_x_resources) + /* --quick was passed, so this is a no-op. */ + return NULL; + return (w32_get_string_resource (name, class, REG_SZ)); } 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) { XrmValue value; + if (inhibit_x_resources) + /* --quick was passed, so this is a no-op. */ + return NULL; + if (x_get_resource (rdb, name, class, x_rm_string, &value)) return (char *) value.addr; |
