[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src emacs.c nsterm.h nsfns.m nsterm.m
From: |
Adrian Robert |
Subject: |
[Emacs-diffs] emacs/src emacs.c nsterm.h nsfns.m nsterm.m |
Date: |
Fri, 23 Jan 2009 09:58:03 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Adrian Robert <arobert> 09/01/23 09:58:03
Modified files:
src : emacs.c nsterm.h nsfns.m nsterm.m
Log message:
* emacs.c (ns_no_defaults): New declaration. (main): Use it. *
nsterm.h (ns_no_defaults): New declaration. * nsfns.m (x_get_string_resource):
Don't read when ns_no_defaults. * nsterm.m (ns_no_defaults): New variable.
(ns_initialize): Don't read defaults when ns_no_defaults.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/emacs.c?cvsroot=emacs&r1=1.459&r2=1.460
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsterm.h?cvsroot=emacs&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsfns.m?cvsroot=emacs&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsterm.m?cvsroot=emacs&r1=1.49&r2=1.50
Patches:
Index: emacs.c
===================================================================
RCS file: /sources/emacs/emacs/src/emacs.c,v
retrieving revision 1.459
retrieving revision 1.460
diff -u -b -r1.459 -r1.460
--- emacs.c 23 Jan 2009 09:12:53 -0000 1.459
+++ emacs.c 23 Jan 2009 09:58:02 -0000 1.460
@@ -202,6 +202,10 @@
int display_arg;
#endif
+#ifdef HAVE_NS
+extern char ns_no_defaults;
+#endif
+
/* An address near the bottom of the stack.
Tells GC how to save a copy of the stack. */
char *stack_bottom;
@@ -1473,6 +1477,16 @@
{
char *tmp;
display_arg = 4;
+ if (argmatch (argv, argc, "-q", "--no-init-file", 6, NULL, &skip_args))
+ {
+ 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)
{
Index: nsterm.h
===================================================================
RCS file: /sources/emacs/emacs/src/nsterm.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- nsterm.h 22 Jan 2009 13:55:44 -0000 1.20
+++ nsterm.h 23 Jan 2009 09:58:02 -0000 1.21
@@ -726,6 +726,7 @@
extern int ns_lisp_to_cursor_type ();
extern Lisp_Object ns_cursor_type_to_lisp (int arg);
extern Lisp_Object Qnone;
+extern char ns_no_defaults;
/* XColor defined in dispextern.h (we use color_def->pixel = NSColor id), but
this causes an #include snafu, so we can't declare it. */
Index: nsfns.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsfns.m,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- nsfns.m 22 Jan 2009 13:55:44 -0000 1.35
+++ nsfns.m 23 Jan 2009 09:58:03 -0000 1.36
@@ -2185,7 +2185,8 @@
/*fprintf (stderr, "Checking '%s'\n", toCheck); */
- res = [[[NSUserDefaults standardUserDefaults] objectForKey:
+ res = ns_no_defaults ? NULL :
+ [[[NSUserDefaults standardUserDefaults] objectForKey:
[NSString stringWithUTF8String: toCheck]] UTF8String];
return !res ? NULL :
(!strncasecmp (res, "YES", 3) ? "true" :
Index: nsterm.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsterm.m,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- nsterm.m 22 Jan 2009 13:55:44 -0000 1.49
+++ nsterm.m 23 Jan 2009 09:58:03 -0000 1.50
@@ -151,9 +151,17 @@
EmacsPrefsController *prefsController;
-/* Defaults managed through the OpenStep defaults system. These pertain to
- the NS interface specifically. Although a customization group could be
- created, it's more natural to manage them via defaults. */
+/* Preferences equivalent to those set by X resources under X are managed
+ through the OpenStep defaults system. These pertain to behavior of the
+ graphical interface components. The one difference from X is that the
+ values below are SET when the user chooses save-options. This makes
+ things easier for users, but sometimes violates expectations when some
+ user-set options appear when running under -q/Q. Therefore we depart
+ from X behavior and refuse to read defaults when started under these
+ options. */
+
+/* Set in emacs.c. */
+char ns_no_defaults;
/* Specifies which emacs modifier should be generated when NS receives
the Alternate modifer. May be Qnone or any of the modifier lisp symbols. */
@@ -3801,9 +3809,6 @@
/* Put it on ns_display_name_list */
ns_display_name_list = Fcons (Fcons (display_name, Qnil),
ns_display_name_list);
-/* ns_display_name_list = Fcons (Fcons (display_name,
- Fcons (Qnil, dpyinfo->xrdb)),
- ns_display_name_list); */
dpyinfo->name_list_element = XCAR (ns_display_name_list);
/* Set the name of the terminal. */
@@ -3815,6 +3820,8 @@
/* Read various user defaults. */
ns_set_default_prefs ();
+ if (!ns_no_defaults)
+ {
ns_default ("AlternateModifier", &ns_alternate_modifier,
Qnil, Qnil, NO, YES);
if (NILP (ns_alternate_modifier))
@@ -3843,6 +3850,8 @@
Qt, Qnil, NO, NO);
ns_default ("UseSystemHighlightColor", &ns_use_system_highlight_color,
Qt, Qnil, NO, NO);
+ }
+
if (EQ (ns_use_system_highlight_color, Qt))
{
ns_selection_color = [[NSUserDefaults standardUserDefaults]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src emacs.c nsterm.h nsfns.m nsterm.m,
Adrian Robert <=