aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Robert <[email protected]>2008-07-28 01:41:57 +0000
committerAdrian Robert <[email protected]>2008-07-28 01:41:57 +0000
commitbd6ce2baf7e701efdb42df45cf25e1789e9d66f4 (patch)
tree2f7021e1b364d067bf726a5db662b29e5c7ad8b5
parent0eafa5a7046ee3f4238a0127aeb8b3d783a8dc30 (diff)
code cleanups in NS port
-rw-r--r--src/ChangeLog10
-rw-r--r--src/nsfns.m25
-rw-r--r--src/nsselect.m19
-rw-r--r--src/nsterm.m2
4 files changed, 24 insertions, 32 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 49c13b4fdf..f60633e518 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
2008-07-27 Adrian Robert <[email protected]>
+ * nsfns.m (x-create-frame): Add copy of parms argument to beginning.
+ Set Vx_resource_name to a fallback. Replace read of 'buffered'
+ parameter with read of 'alpha' one.
+ (Qns_frame_parameter): Remove.
+ * nsselection.m (selection-coding-system)
+ (next-selection-coding-system, Vselection_coding_system)
+ (Vnext_selection_coding_system): Drop.
+
+2008-07-27 Adrian Robert <[email protected]>
+
* nsfns.m (do-applescript, do_applescript): Rename to
ns-do-applescript, ns_do_applescript, and move within file.
diff --git a/src/nsfns.m b/src/nsfns.m
index 493885f353..40e8791c31 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -78,7 +78,6 @@ extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth;
extern Lisp_Object Qunsplittable, Qmenu_bar_lines, Qbuffer_predicate, Qtitle;
Lisp_Object Qnone;
-Lisp_Object Qns_frame_parameter;
Lisp_Object Qbuffered;
Lisp_Object Qfontsize;
@@ -1057,6 +1056,10 @@ be shared by the new frame. */)
check_ns ();
+ /* Seems a little strange, but other terms do it. Perhaps the code below
+ is modifying something? */
+ parms = Fcopy_alist (parms);
+
display = x_get_arg (dpyinfo, parms, Qterminal, 0, 0, RES_TYPE_STRING);
if (EQ (display, Qunbound))
display = Qnil;
@@ -1075,6 +1078,8 @@ be shared by the new frame. */)
if (STRINGP (name))
Vx_resource_name = name;
+ else
+ Vx_resource_name = Vinvocation_name;
parent = x_get_arg (dpyinfo, parms, Qparent_id, 0, 0, RES_TYPE_NUMBER);
if (EQ (parent, Qunbound))
@@ -1136,7 +1141,7 @@ be shared by the new frame. */)
f->icon_name = x_get_arg (dpyinfo, parms, Qicon_name, "iconName", "Title",
RES_TYPE_STRING);
- if (EQ (f->icon_name, Qunbound) || (XTYPE (f->icon_name) != Lisp_String))
+ if (! STRINGP (f->icon_name))
f->icon_name = Qnil;
FRAME_NS_DISPLAY_INFO (f) = dpyinfo;
@@ -1275,18 +1280,18 @@ be shared by the new frame. */)
Vframe_list = Fcons (frame, Vframe_list);
/*FRAME_NS_DISPLAY_INFO (f)->reference_count++; */
- x_default_parameter (f, parms, Qcursor_type, Qbox, "cursorType", "CursorType",
- RES_TYPE_SYMBOL);
- x_default_parameter (f, parms, Qscroll_bar_width, Qnil, "scrollBarWidth",
- "ScrollBarWidth", RES_TYPE_NUMBER);
x_default_parameter (f, parms, Qicon_type, Qnil, "bitmapIcon", "BitmapIcon",
RES_TYPE_SYMBOL);
- x_default_parameter (f, parms, Qauto_raise, Qnil, "autoRaise", "AutoRaise",
+ x_default_parameter (f, parms, Qauto_raise, Qnil, "autoRaise", "AutoRaiseLower",
RES_TYPE_BOOLEAN);
x_default_parameter (f, parms, Qauto_lower, Qnil, "autoLower", "AutoLower",
RES_TYPE_BOOLEAN);
- x_default_parameter (f, parms, Qbuffered, Qt, "buffered", "Buffered",
- RES_TYPE_BOOLEAN);
+ x_default_parameter (f, parms, Qcursor_type, Qbox, "cursorType", "CursorType",
+ RES_TYPE_SYMBOL);
+ x_default_parameter (f, parms, Qscroll_bar_width, Qnil, "scrollBarWidth",
+ "ScrollBarWidth", RES_TYPE_NUMBER);
+ x_default_parameter (f, parms, Qalpha, Qt, "alpha", "Alpha",
+ RES_TYPE_NUMBER);
width = FRAME_COLS (f);
height = FRAME_LINES (f);
@@ -2603,8 +2608,6 @@ syms_of_nsfns ()
{
int i;
- Qns_frame_parameter = intern ("ns-frame-parameter");
- staticpro (&Qns_frame_parameter);
Qnone = intern ("none");
staticpro (&Qnone);
Qbuffered = intern ("bufferd");
diff --git a/src/nsselect.m b/src/nsselect.m
index 35a9f43634..88f8b26250 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -40,10 +40,6 @@ static Lisp_Object Vselection_alist;
static Lisp_Object Vselection_converter_alist;
/* 23: new */
-/* Coding system for communicating with other programs. */
-static Lisp_Object Vselection_coding_system;
-/* Coding system for the next communicating with other programs. */
-static Lisp_Object Vnext_selection_coding_system;
static Lisp_Object Qforeign_selection;
NSString *NXSecondaryPboard;
@@ -608,21 +604,6 @@ The functions are called with one argument, the selection type\n\
Vns_lost_selection_hooks = Qnil;
/* 23: { */
- DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
- doc: /* Coding system for communicating with other programs.
-When sending or receiving text via cut_buffer, selection, and clipboard,
-the text is encoded or decoded by this coding system.
-The default value is determined by the system script code. */);
- Vselection_coding_system = Qnil;
-
- DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system,
- doc: /* Coding system for the next communication with other programs.
-Usually, `selection-coding-system' is used for communicating with
-other programs. But, if this variable is set, it is used for the
-next communication only. After the communication, this variable is
-set to nil. */);
- Vnext_selection_coding_system = Qnil;
-
Qforeign_selection = intern ("foreign-selection");
staticpro (&Qforeign_selection);
/* } */
diff --git a/src/nsterm.m b/src/nsterm.m
index ecf4489437..2f8348a9b0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4347,7 +4347,6 @@ extern void update_window_cursor (struct window *w, int on);
if (!emacs_event)
return;
-/*#if defined (COCOA_EXPERIMENTAL_CTRL_G) */
if (![[self window] isKeyWindow])
{
/* XXX: Using NO_SOCK_SIGIO like Carbon causes a condition in which,
@@ -4361,7 +4360,6 @@ extern void update_window_cursor (struct window *w, int on);
[[(EmacsView *)[theEvent window] delegate] keyDown: theEvent];
return;
}
-/*#endif */
if (nsEvArray == nil)
nsEvArray = [[NSMutableArray alloc] initWithCapacity: 1];