Mercurial > emacs
changeset 97047:c628dd388bdb
code cleanups in NS port
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Mon, 28 Jul 2008 01:41:57 +0000 |
parents | cd3145d8768e |
children | 07311809a1f0 |
files | src/ChangeLog src/nsfns.m src/nsselect.m src/nsterm.m |
diffstat | 4 files changed, 25 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sun Jul 27 22:11:45 2008 +0000 +++ b/src/ChangeLog Mon Jul 28 01:41:57 2008 +0000 @@ -1,3 +1,13 @@ +2008-07-27 Adrian Robert <Adrian.B.Robert@gmail.com> + + * 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 <Adrian.B.Robert@gmail.com> * nsfns.m (do-applescript, do_applescript): Rename to
--- a/src/nsfns.m Sun Jul 27 22:11:45 2008 +0000 +++ b/src/nsfns.m Mon Jul 28 01:41:57 2008 +0000 @@ -78,7 +78,6 @@ 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 @@ 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 @@ 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 @@ 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 @@ Vframe_list = Fcons (frame, Vframe_list); /*FRAME_NS_DISPLAY_INFO (f)->reference_count++; */ + x_default_parameter (f, parms, Qicon_type, Qnil, "bitmapIcon", "BitmapIcon", + RES_TYPE_SYMBOL); + 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, 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", - 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, Qalpha, Qt, "alpha", "Alpha", + RES_TYPE_NUMBER); width = FRAME_COLS (f); height = FRAME_LINES (f); @@ -2603,8 +2608,6 @@ { int i; - Qns_frame_parameter = intern ("ns-frame-parameter"); - staticpro (&Qns_frame_parameter); Qnone = intern ("none"); staticpro (&Qnone); Qbuffered = intern ("bufferd");
--- a/src/nsselect.m Sun Jul 27 22:11:45 2008 +0000 +++ b/src/nsselect.m Mon Jul 28 01:41:57 2008 +0000 @@ -40,10 +40,6 @@ 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 @@ 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); /* } */
--- a/src/nsterm.m Sun Jul 27 22:11:45 2008 +0000 +++ b/src/nsterm.m Mon Jul 28 01:41:57 2008 +0000 @@ -4347,7 +4347,6 @@ 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 @@ [[(EmacsView *)[theEvent window] delegate] keyDown: theEvent]; return; } -/*#endif */ if (nsEvArray == nil) nsEvArray = [[NSMutableArray alloc] initWithCapacity: 1];