[125828] trunk/dports/aqua/emacs-app

hum at macports.org hum at macports.org
Sat Sep 27 01:23:49 PDT 2014


Revision: 125828
          https://trac.macports.org/changeset/125828
Author:   hum at macports.org
Date:     2014-09-27 01:23:49 -0700 (Sat, 27 Sep 2014)
Log Message:
-----------
emacs-app: update inline patch to rev.583.

Modified Paths:
--------------
    trunk/dports/aqua/emacs-app/Portfile
    trunk/dports/aqua/emacs-app/files/patch-macemacsjp-inline.diff

Modified: trunk/dports/aqua/emacs-app/Portfile
===================================================================
--- trunk/dports/aqua/emacs-app/Portfile	2014-09-27 05:48:29 UTC (rev 125827)
+++ trunk/dports/aqua/emacs-app/Portfile	2014-09-27 08:23:49 UTC (rev 125828)
@@ -5,7 +5,7 @@
 
 name                emacs-app
 version             24.3
-revision            4
+revision            5
 categories          aqua editors
 maintainers         hum css openmaintainer
 
@@ -70,7 +70,7 @@
     # inline patch fetched from MacEmacsJP.
     # patch-macemacsjp-inline.diff
     # http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk/emacs-inline.patch
-    # revision 582 (2012/05/20) modified for emacs-24.3.
+    # revision 583 (2013/04/13) modified for emacs-24.3.
     patchfiles-append   patch-macemacsjp-inline.diff
     # http://sakito.jp/emacs/emacs24.html
     depends_build-append port:autoconf port:automake port:libtool

Modified: trunk/dports/aqua/emacs-app/files/patch-macemacsjp-inline.diff
===================================================================
--- trunk/dports/aqua/emacs-app/files/patch-macemacsjp-inline.diff	2014-09-27 05:48:29 UTC (rev 125827)
+++ trunk/dports/aqua/emacs-app/files/patch-macemacsjp-inline.diff	2014-09-27 08:23:49 UTC (rev 125828)
@@ -1,540 +1,6 @@
---- configure.orig	2013-03-08 17:13:36.000000000 +0900
-+++ configure	2013-03-12 00:01:16.000000000 +0900
-@@ -9650,7 +9650,7 @@
-      leimdir="\${ns_appresdir}/leim"
-      INSTALL_ARCH_INDEP_EXTRA=
-   fi
--  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
-+  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o"
- fi
- CFLAGS="$tmp_CFLAGS"
- CPPFLAGS="$tmp_CPPFLAGS"
-@@ -24618,7 +24618,7 @@
-    ## 0x690 is the total size of 30 segment load commands (at 56
-    ## each); under Cocoa 31 commands are required.
-    if test "$HAVE_NS" = "yes"; then
--     libs_nsgui="-framework AppKit"
-+     libs_nsgui="-framework AppKit -framework Carbon"
-      headerpad_extra=6C8
-    else
-      libs_nsgui=
---- configure.ac.orig	2013-03-05 17:24:59.000000000 +0900
-+++ configure.ac	2013-03-12 00:01:01.000000000 +0900
-@@ -1571,7 +1571,7 @@
-      leimdir="\${ns_appresdir}/leim"
-      INSTALL_ARCH_INDEP_EXTRA=
-   fi
--  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
-+  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o"
- fi
- CFLAGS="$tmp_CFLAGS"
- CPPFLAGS="$tmp_CPPFLAGS"
-@@ -4322,7 +4322,7 @@
-    ## 0x690 is the total size of 30 segment load commands (at 56
-    ## each); under Cocoa 31 commands are required.
-    if test "$HAVE_NS" = "yes"; then
--     libs_nsgui="-framework AppKit"
-+     libs_nsgui="-framework AppKit -framework Carbon"
-      headerpad_extra=6C8
-    else
-      libs_nsgui=
-diff -r -N -p ../emacs-24.0.96/src/Makefile.in src/Makefile.in
-*** ../emacs-24.0.96/src/Makefile.in	2012-04-08 12:03:02.000000000 +0900
---- src/Makefile.in	2012-05-03 22:23:59.000000000 +0900
-*************** obj = $(base_obj) $(NS_OBJC_OBJ)
-*** 350,356 ****
-  SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
-    xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
-    fontset.o dbusbind.o cygw32.o \
-!   nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
-    w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
-    w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
-    w16select.o widget.o xfont.o ftfont.o xftfont.o ftxfont.o gtkutil.o \
---- 350,356 ----
-  SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
-    xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
-    fontset.o dbusbind.o cygw32.o \
-!   nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o\
-    w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
-    w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
-    w16select.o widget.o xfont.o ftfont.o xftfont.o ftxfont.o gtkutil.o \
-diff -r -N -p ../emacs-24.0.96/src/keyboard.c src/keyboard.c
-*** ../emacs-24.0.96/src/keyboard.c	2012-04-08 12:03:02.000000000 +0900
---- src/keyboard.c	2012-05-03 22:23:59.000000000 +0900
-*************** kbd_buffer_get_event (KBOARD **kbp,
-*** 3915,3922 ****
-          {
-            if (event->code == KEY_NS_PUT_WORKING_TEXT)
-              obj = Fcons (intern ("ns-put-working-text"), Qnil);
-!           else
-              obj = Fcons (intern ("ns-unput-working-text"), Qnil);
-  	  kbd_fetch_ptr = event + 1;
-            if (used_mouse_menu)
-              *used_mouse_menu = 1;
---- 3915,3924 ----
-          {
-            if (event->code == KEY_NS_PUT_WORKING_TEXT)
-              obj = Fcons (intern ("ns-put-working-text"), Qnil);
-!           else if (event->code == KEY_NS_UNPUT_WORKING_TEXT)
-              obj = Fcons (intern ("ns-unput-working-text"), Qnil);
-+ 	  else if (event->code == KEY_NS_PUT_MARKED_TEXT)
-+ 	    obj = Fcons (intern ("ns-put-marked-text"), event->arg);
-  	  kbd_fetch_ptr = event + 1;
-            if (used_mouse_menu)
-              *used_mouse_menu = 1;
-*************** keys_of_keyboard (void)
-*** 12332,12337 ****
---- 12334,12341 ----
-  			    "ns-put-working-text");
-    initial_define_lispy_key (Vspecial_event_map, "ns-unput-working-text",
-  			    "ns-unput-working-text");
-+   initial_define_lispy_key (Vspecial_event_map, "ns-put-marked-text",
-+ 			    "ns-put-marked-text");
-    /* Here we used to use `ignore-event' which would simple set prefix-arg to
-       current-prefix-arg, as is done in `handle-switch-frame'.
-       But `handle-switch-frame is not run from the special-map.
-diff -r -N -p ../emacs-24.0.96/src/macim.m src/macim.m
-*** ../emacs-24.0.96/src/macim.m	1970-01-01 09:00:00.000000000 +0900
---- src/macim.m	2012-05-03 22:23:59.000000000 +0900
-***************
-*** 0 ****
---- 1,177 ----
-+ /* Implementation of Input Method Extension for MacOS X.
-+    Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-+    Taiichi Hashimoto <taiichi2 at mac.com>.
-+ */
-+ 
-+ #include "config.h"
-+ 
-+ #ifdef NS_IMPL_COCOA
-+ 
-+ #include <math.h>
-+ #include <sys/types.h>
-+ #include <time.h>
-+ #include <signal.h>
-+ #include <unistd.h>
-+ 
-+ #include <Carbon/Carbon.h>
-+ 
-+ #include "lisp.h"
-+ #include "blockinput.h"
-+ 
-+ enum output_method
-+ {
-+   output_initial,
-+   output_termcap,
-+   output_x_window,
-+   output_msdos_raw,
-+   output_w32,
-+   output_mac,
-+   output_ns
-+ } output_method;
-+ 
-+ #include "termhooks.h"
-+ #include "keyboard.h"
-+ #include "buffer.h"
-+ 
-+ //extern Lisp_Object Qcurrent_input_method;
-+ //extern int cursor_in_echo_area;
-+ static Lisp_Object Qmac_keys_passed_to_system;
-+ 
-+ void mac_init_input_method ();
-+ int mac_pass_key_to_system (int code, int modifiers);
-+ int mac_pass_key_directly_to_emacs ();
-+ int mac_store_change_input_method_event ();
-+ 
-+ DEFUN ("mac-input-source-is-ascii-capable", Fmac_input_source_is_ascii_capable, Smac_input_source_is_ascii_capable,
-+        0, 0, 0,
-+        doc: /* Is current input source ascii capable? */)
-+      (void)
-+ {
-+   TISInputSourceRef is = TISCopyCurrentKeyboardInputSource();
-+   CFBooleanRef ret = TISGetInputSourceProperty(is, kTISPropertyInputSourceIsASCIICapable);
-+   
-+   return CFBooleanGetValue(ret)? Qt : Qnil;
-+ }
-+ 
-+ DEFUN ("mac-get-input-source-list", Fmac_get_input_source_list, Smac_get_input_source_list,
-+        0, 0, 0,
-+        doc: /* get input source list on MacOSX */)
-+      (void)
-+ {
-+   NSArray *is_list = (NSArray *)TISCreateInputSourceList(NULL, false);
-+   int list_size = [is_list count];
-+   Lisp_Object list[list_size];
-+   int i;
-+ 
-+   for (i = 0; i < list_size; i++) {
-+     TISInputSourceRef is = (TISInputSourceRef)[is_list objectAtIndex:i];
-+     NSString *id = (NSString *)TISGetInputSourceProperty(is, kTISPropertyInputSourceID);
-+     list[i] = make_string([id UTF8String],
-+ 			  [id lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
-+   }
-+ 
-+   return Flist(list_size, list);
-+ }
-+ 
-+ DEFUN ("mac-get-current-input-source", Fmac_get_current_input_source, Smac_get_current_input_source,
-+        0, 0, 0,
-+        doc: /* get current input source on MacOSX */)
-+      (void)
-+ {
-+   TISInputSourceRef is = TISCopyCurrentKeyboardInputSource();
-+   NSString *id = (NSString *)TISGetInputSourceProperty(is, kTISPropertyInputSourceID);
-+ 
-+   return make_string([id UTF8String],
-+ 		     [id lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
-+ }
-+ 
-+ DEFUN ("mac-toggle-input-source", Fmac_toggle_input_source, Smac_toggle_input_source,
-+        1, 1, 0,
-+        doc: /* toggle input source on MacOSX */)
-+      (arg)
-+      Lisp_Object arg;
-+ {
-+   TISInputSourceRef is = NULL;
-+ 
-+   if (NILP (arg))
-+     {
-+       is = TISCopyCurrentASCIICapableKeyboardInputSource();
-+     }
-+   else
-+     {
-+       NSString *locale = [[NSLocale currentLocale] localeIdentifier];
-+       is = TISCopyInputSourceForLanguage((CFStringRef)locale);
-+     }
-+   if (is) TISSelectInputSource(is);
-+ 
-+   return arg;
-+ }
-+ 
-+ int
-+ mac_store_change_input_method_event ()
-+ {
-+   Lisp_Object dim;
-+   int ret = FALSE;
-+   
-+   dim = Fsymbol_value (intern ("default-input-method"));
-+   if (STRINGP (dim) && strcmp(SDATA (dim), "MacOSX") == 0)
-+     {
-+       ret = TRUE;
-+     }
-+ 
-+   return ret;
-+ }
-+ 
-+ int
-+ mac_pass_key_to_system (int code, int modifiers)
-+ {
-+   Lisp_Object keys = Fsymbol_value (Qmac_keys_passed_to_system);
-+   Lisp_Object m, k; 
-+ 
-+   while (!NILP (keys))
-+     {
-+       m = XCAR (XCAR (keys));
-+       k = XCDR (XCAR (keys));
-+       keys = XCDR (keys);
-+ 
-+       if (NUMBERP (m) && modifiers == XINT (m))
-+ 	if (NILP (k)
-+ 	    || (NUMBERP (k) && code == XINT (k)))
-+ 	  return TRUE;
-+     }
-+   
-+   return FALSE;
-+ }
-+ 
-+ int
-+ mac_pass_key_directly_to_emacs (void)
-+ {
-+ 
-+   if (NILP (Fmac_input_source_is_ascii_capable()))
-+     {
-+       if (NILP (Vmac_use_input_method_on_system)
-+ 	  || this_command_key_count 
-+ 	  || cursor_in_echo_area 
-+ 	  || !NILP (BVAR (current_buffer, read_only)))
-+ 	return TRUE;
-+     }
-+ 
-+   return FALSE;
-+ }
-+ 
-+ 
-+ void mac_init_input_method (void)
-+ {
-+   Qmac_keys_passed_to_system = intern ("mac-keys-passed-to-system");
-+   staticpro (&Qmac_keys_passed_to_system);
-+ 
-+   DEFVAR_LISP ("mac-use-input-method-on-system", Vmac_use_input_method_on_system,
-+                doc: /* If it is non-nil, use input method on system. */);
-+   Vmac_use_input_method_on_system = Qt;
-+ 
-+   defsubr (&Smac_input_source_is_ascii_capable);
-+   defsubr (&Smac_get_input_source_list);
-+   defsubr (&Smac_get_current_input_source);
-+   defsubr (&Smac_toggle_input_source);
-+ }
-+ #endif
-diff -r -N -p ../emacs-24.0.96/src/nsfns.m src/nsfns.m
-*** ../emacs-24.0.96/src/nsfns.m	2012-04-08 12:03:02.000000000 +0900
---- src/nsfns.m	2012-05-04 00:05:24.000000000 +0900
-*************** static ptrdiff_t image_cache_refcount;
-*** 111,117 ****
-  
-     ========================================================================== */
-  
-- 
-  void
-  check_ns (void)
-  {
---- 111,116 ----
-*************** be used as the image of the icon represe
-*** 2722,2727 ****
---- 2721,2744 ----
-                 doc: /* Toolkit version for NS Windowing.  */);
-    Vns_version_string = ns_appkit_version_str ();
-  
-+ 
-+   DEFVAR_LISP ("ns-shift-key-mask", Vns_shift_key_mask,
-+                doc: /* Shift key mask defined in system. */);
-+   Vns_shift_key_mask = make_number (NSShiftKeyMask);
-+ 
-+   DEFVAR_LISP ("ns-control-key-mask", Vns_control_key_mask,
-+                doc: /* Control key mask defined in system. */);
-+   Vns_control_key_mask = make_number (NSControlKeyMask);
-+ 
-+   DEFVAR_LISP ("ns-alternate-key-mask", Vns_alternate_key_mask,
-+                doc: /* Alternate key mask defined in system. */);
-+   Vns_alternate_key_mask = make_number (NSAlternateKeyMask);
-+ 
-+   DEFVAR_LISP ("ns-command-key-mask", Vns_command_key_mask,
-+                doc: /* Command key mask defined in system. */);
-+   Vns_command_key_mask = make_number (NSCommandKeyMask);
-+ 
-+ 
-    defsubr (&Sns_read_file_name);
-    defsubr (&Sns_get_resource);
-    defsubr (&Sns_set_resource);
-*************** be used as the image of the icon represe
-*** 2766,2771 ****
---- 2783,2792 ----
-    defsubr (&Sx_show_tip);
-    defsubr (&Sx_hide_tip);
-  
-+ #ifdef NS_IMPL_COCOA
-+   mac_init_input_method ();
-+ #endif
-+ 
-    /* used only in fontset.c */
-    check_window_system_func = check_ns;
-  
-diff -r -N -p ../emacs-24.0.96/src/nsterm.h src/nsterm.h
-*** ../emacs-24.0.96/src/nsterm.h	2012-04-08 12:03:02.000000000 +0900
---- src/nsterm.h	2012-05-03 22:23:59.000000000 +0900
-*************** typedef unsigned int NSUInteger;
-*** 398,403 ****
---- 398,405 ----
-  #define KEY_NS_NEW_FRAME               ((1<<28)|(0<<16)|12)
-  #define KEY_NS_TOGGLE_TOOLBAR          ((1<<28)|(0<<16)|13)
-  #define KEY_NS_SHOW_PREFS              ((1<<28)|(0<<16)|14)
-+ #define KEY_MAC_CHANGE_INPUT_METHOD    ((1<<28)|(0<<16)|15)
-+ #define KEY_NS_PUT_MARKED_TEXT         ((1<<28)|(0<<16)|16)
-  
-  /* could use list to store these, but rest of emacs has a big infrastructure
-     for managing a table of bitmap "records" */
-diff -r -N -p ../emacs-24.0.96/src/nsterm.m src/nsterm.m
-*** ../emacs-24.0.96/src/nsterm.m	2012-04-09 22:08:55.000000000 +0900
---- src/nsterm.m	2012-05-04 00:12:13.000000000 +0900
-*************** ns_term_init (Lisp_Object display_name)
-*** 4040,4045 ****
---- 4040,4048 ----
-    /*   [[NSNotificationCenter defaultCenter] addObserver: NSApp
-                                           selector: @selector (logNotification:)
-                                               name: nil object: nil]; */
-+   [[NSDistributedNotificationCenter defaultCenter] addObserver: NSApp
-+ 					selector: @selector (changeInputMethod:)
-+ 						   name: @"AppleSelectedInputSourcesChangedNotification" object: nil];
-  
-    dpyinfo = (struct ns_display_info *)xmalloc (sizeof (struct ns_display_info));
-    memset (dpyinfo, 0, sizeof (struct ns_display_info));
-*************** ns_term_shutdown (int sig)
-*** 4255,4260 ****
---- 4258,4276 ----
-      NSLog (@"notification: '%@'", [notification name]);
-  }
-  
-+ - (void)changeInputMethod: (NSNotification *)notification
-+ {
-+ 
-+   struct frame *emacsframe = SELECTED_FRAME ();
-+ 
-+   if (mac_store_change_input_method_event())
-+     {
-+       emacs_event->kind = NS_NONKEY_EVENT;
-+       emacs_event->code = KEY_MAC_CHANGE_INPUT_METHOD;
-+       emacs_event->modifiers = 0;
-+       EV_TRAILER ((id)nil);
-+     }
-+ }
-  
-  - (void)sendEvent: (NSEvent *)theEvent
-  /* --------------------------------------------------------------------------
-*************** ns_term_shutdown (int sig)
-*** 4857,4863 ****
-               code, fnKeysym, flags, emacs_event->modifiers);
-  
-        /* if it was a function key or had modifiers, pass it directly to emacs */
-!       if (fnKeysym || (emacs_event->modifiers
-                         && (emacs_event->modifiers != shift_modifier)
-                         && [[theEvent charactersIgnoringModifiers] length] > 0))
-  /*[[theEvent characters] length] */
---- 4872,4879 ----
-               code, fnKeysym, flags, emacs_event->modifiers);
-  
-        /* if it was a function key or had modifiers, pass it directly to emacs */
-!       if (mac_pass_key_directly_to_emacs ()
-! 	  ||fnKeysym || (emacs_event->modifiers
-                         && (emacs_event->modifiers != shift_modifier)
-                         && [[theEvent charactersIgnoringModifiers] length] > 0))
-  /*[[theEvent characters] length] */
-*************** ns_term_shutdown (int sig)
-*** 4872,4879 ****
-                ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT;
-  
-            emacs_event->code = code;
-!           EV_TRAILER (theEvent);
-!           return;
-          }
-      }
-  
---- 4888,4905 ----
-                ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT;
-  
-            emacs_event->code = code;
-! 	  /* The function mac_pass_key_to_system decides 
-! 	     whether it is passed directly to emacs or not. */
-! 	  if (emacs_event->kind == NON_ASCII_KEYSTROKE_EVENT
-! 	      || !mac_pass_key_to_system (code, flags
-! 					  & (NSShiftKeyMask
-! 					     | NSControlKeyMask
-! 					     | NSAlternateKeyMask
-! 					     | NSCommandKeyMask)))
-! 	    {
-! 	      EV_TRAILER (theEvent);
-! 	      return;
-! 	    }
-          }
-      }
-  
-*************** ns_term_shutdown (int sig)
-*** 4966,4975 ****
-      NSLog (@"setMarkedText '%@' len =%d range %d from %d", str, [str length],
-             selRange.length, selRange.location);
-  
--   if (workingText != nil)
--     [self deleteWorkingText];
-    if ([str length] == 0)
-!     return;
-  
-    if (!emacs_event)
-      return;
---- 4992,5010 ----
-      NSLog (@"setMarkedText '%@' len =%d range %d from %d", str, [str length],
-             selRange.length, selRange.location);
-  
-    if ([str length] == 0)
-!     {
-!       [self deleteWorkingText];
-!       return;
-!     }
-!   else
-!     {
-!       if (workingText != nil) {
-! 	[workingText release];
-! 	workingText = nil;
-! 	processingCompose = NO;
-!       }
-!     }
-  
-    if (!emacs_event)
-      return;
-*************** ns_term_shutdown (int sig)
-*** 4979,4985 ****
-    ns_working_text = build_string ([workingText UTF8String]);
-  
-    emacs_event->kind = NS_TEXT_EVENT;
-!   emacs_event->code = KEY_NS_PUT_WORKING_TEXT;
-    EV_TRAILER ((id)nil);
-  }
-  
---- 5014,5022 ----
-    ns_working_text = build_string ([workingText UTF8String]);
-  
-    emacs_event->kind = NS_TEXT_EVENT;
-!   emacs_event->code = KEY_NS_PUT_MARKED_TEXT;
-!   emacs_event->arg = Fcons (make_number (selRange.location),
-! 			    Fcons (make_number (selRange.length), Qnil));
-    EV_TRAILER ((id)nil);
-  }
-  
-*************** ns_term_shutdown (int sig)
-*** 5034,5048 ****
-  {
-    NSRect rect;
-    NSPoint pt;
-!   struct window *win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
-    if (NS_KEYLOG)
-      NSLog (@"firstRectForCharRange request");
-  
-    rect.size.width = theRange.length * FRAME_COLUMN_WIDTH (emacsframe);
-    rect.size.height = FRAME_LINE_HEIGHT (emacsframe);
-    pt.x = WINDOW_TEXT_TO_FRAME_PIXEL_X (win, win->phys_cursor.x);
-    pt.y = WINDOW_TO_FRAME_PIXEL_Y (win, win->phys_cursor.y
-!                                        +FRAME_LINE_HEIGHT (emacsframe));
-  
-    pt = [self convertPoint: pt toView: nil];
-    pt = [[self window] convertBaseToScreen: pt];
---- 5071,5093 ----
-  {
-    NSRect rect;
-    NSPoint pt;
-!   //  struct window *win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
-!   struct window *win;
-    if (NS_KEYLOG)
-      NSLog (@"firstRectForCharRange request");
-+     
-+   if (NILP (Vmac_in_echo_area))
-+     win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
-+     else if (WINDOWP (echo_area_window))
-+     win = XWINDOW (echo_area_window);
-+   else
-+     win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
-  
-    rect.size.width = theRange.length * FRAME_COLUMN_WIDTH (emacsframe);
-    rect.size.height = FRAME_LINE_HEIGHT (emacsframe);
-    pt.x = WINDOW_TEXT_TO_FRAME_PIXEL_X (win, win->phys_cursor.x);
-    pt.y = WINDOW_TO_FRAME_PIXEL_Y (win, win->phys_cursor.y
-!                                        +FRAME_LINE_HEIGHT (emacsframe)+2);
-  
-    pt = [self convertPoint: pt toView: nil];
-    pt = [[self window] convertBaseToScreen: pt];
-*************** variable `x-use-underline-position-prope
-*** 6764,6769 ****
---- 6809,6818 ----
-  baseline level.  The default value is nil.  */);
-    x_underline_at_descent_line = 0;
-  
-+   DEFVAR_LISP ("mac-in-echo-area", Vmac_in_echo_area,
-+                doc: /* state of cursor in echo area. */);
-+   Vmac_in_echo_area = Qnil;
-+ 
-    /* Tell emacs about this window system. */
-    Fprovide (intern ("ns"), Qnil);
-  }
-diff -r -N -p ../emacs-24.0.96/lisp/term/common-win.el lisp/term/common-win.el
-*** ../emacs-24.0.96/lisp/term/common-win.el	2012-04-08 12:03:02.000000000 +0900
---- lisp/term/common-win.el	2012-05-03 22:23:59.000000000 +0900
+diff -r -N -p -x '*.elc' ../emacs-24.3.org/lisp/term/common-win.el lisp/term/common-win.el
+*** ../emacs-24.3.org/lisp/term/common-win.el	2013-01-02 05:37:17.000000000 +0900
+--- lisp/term/common-win.el	2013-04-13 21:49:53.000000000 +0900
 *************** is not used)."
 *** 127,132 ****
 --- 127,133 ----
@@ -545,12 +11,12 @@
   	       ))))
       (set-terminal-parameter frame 'x-setup-function-keys t)))
   
-diff -r -N -p ../emacs-24.0.96/lisp/term/ns-win.el lisp/term/ns-win.el
-*** ../emacs-24.0.96/lisp/term/ns-win.el	2012-04-08 12:03:02.000000000 +0900
---- lisp/term/ns-win.el	2012-05-03 23:57:14.000000000 +0900
+diff -r -N -p -x '*.elc' ../emacs-24.3.org/lisp/term/ns-win.el lisp/term/ns-win.el
+*** ../emacs-24.3.org/lisp/term/ns-win.el	2013-01-02 05:37:17.000000000 +0900
+--- lisp/term/ns-win.el	2013-04-13 21:50:48.000000000 +0900
 *************** The properties returned may include `top
-*** 173,178 ****
---- 173,179 ----
+*** 171,176 ****
+--- 171,177 ----
   (define-key global-map [ns-new-frame] 'make-frame)
   (define-key global-map [ns-toggle-toolbar] 'ns-toggle-toolbar)
   (define-key global-map [ns-show-prefs] 'customize)
@@ -559,7 +25,7 @@
   
   ;; Set up a number of aliases and other layers to pretend we're using
 *************** The properties returned may include `top
-*** 259,272 ****
+*** 256,269 ****
   ;; editing window.)
   
   (defface ns-working-text-face
@@ -574,7 +40,7 @@
   (defvar ns-working-text)		; nsterm.m
   
   ;; Test if in echo area, based on mac-win.el 2007/08/26 unicode-2.
---- 260,289 ----
+--- 257,286 ----
   ;; editing window.)
   
   (defface ns-working-text-face
@@ -606,7 +72,7 @@
   
   ;; Test if in echo area, based on mac-win.el 2007/08/26 unicode-2.
 *************** When text is in th echo area, this just 
-*** 274,290 ****
+*** 271,287 ****
   (defun ns-in-echo-area ()
     "Whether, for purposes of inserting working composition text, the minibuffer
   is currently being used."
@@ -624,7 +90,7 @@
   
   ;; The 'interactive' here stays for subinvocations, so the ns-in-echo-area
   ;; always returns nil for some reason.  If this WASN'T the case, we could
---- 291,309 ----
+--- 288,306 ----
   (defun ns-in-echo-area ()
     "Whether, for purposes of inserting working composition text, the minibuffer
   is currently being used."
@@ -645,8 +111,8 @@
   ;; The 'interactive' here stays for subinvocations, so the ns-in-echo-area
   ;; always returns nil for some reason.  If this WASN'T the case, we could
 *************** is currently being used."
-*** 293,298 ****
---- 312,318 ----
+*** 290,295 ****
+--- 309,315 ----
   (defun ns-put-working-text ()
     (interactive)
     (if (ns-in-echo-area) (ns-echo-working-text) (ns-insert-working-text)))
@@ -655,7 +121,7 @@
     (interactive)
     (ns-delete-working-text))
 *************** The overlay is assigned the face `ns-wor
-*** 314,332 ****
+*** 311,329 ****
   (defun ns-echo-working-text ()
     "Echo contents of `ns-working-text' in message display area.
   See `ns-insert-working-text'."
@@ -675,7 +141,7 @@
     (cond
      ((and (overlayp ns-working-overlay)
            ;; Still alive?
---- 334,414 ----
+--- 331,411 ----
   (defun ns-echo-working-text ()
     "Echo contents of `ns-working-text' in message display area.
   See `ns-insert-working-text'."
@@ -758,8 +224,8 @@
      ((and (overlayp ns-working-overlay)
            ;; Still alive?
 *************** See the documentation of `create-fontset
-*** 931,936 ****
---- 1013,1438 ----
+*** 943,948 ****
+--- 1025,1490 ----
   (add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
   
   
@@ -923,6 +389,26 @@
 +      (title . "C")
 +      (cursor-color)
 +      (cursor-type))
++     ("com.justsystems.inputmethod.atok21.Roman"
++      (title . "A")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok21.Japanese"
++      (title . "あ")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok21.Japanese.Katakana"
++      (title . "ア")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok21.Japanese.FullWidthRoman"
++      (title . "英")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok21.Japanese.HalfWidthEiji"
++      (title . "半英")
++      (cursor-color)
++      (cursor-type))
 +     ("com.justsystems.inputmethod.atok22.Roman"
 +      (title . "A")
 +      (cursor-color)
@@ -983,6 +469,26 @@
 +      (title . "半英")
 +      (cursor-color)
 +      (cursor-type))
++     ("com.justsystems.inputmethod.atok25.Roman"
++      (title . "A")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok25.Japanese"
++      (title . "あ")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok25.Japanese.Katakana"
++      (title . "ア")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok25.Japanese.FullWidthRoman"
++      (title . "英")
++      (cursor-color)
++      (cursor-type))
++     ("com.justsystems.inputmethod.atok25.Japanese.HalfWidthEiji"
++      (title . "半英")
++      (cursor-color)
++      (cursor-type))
 +     )
 +   "Alist of Mac script code vs parameters for input method on MacOSX.")
 + 
@@ -1186,4 +692,578 @@
   (provide 'ns-win)
   
   ;;; ns-win.el ends here
-
+diff -r -N -p ../emacs-24.3.org/src/Makefile.in src/Makefile.in
+*** ../emacs-24.3.org/src/Makefile.in	2013-01-02 05:37:17.000000000 +0900
+--- src/Makefile.in	2013-04-13 21:49:53.000000000 +0900
+*************** obj = $(base_obj) $(NS_OBJC_OBJ)
+*** 356,362 ****
+  SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
+    xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
+    fontset.o dbusbind.o cygw32.o \
+!   nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
+    w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
+    w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
+    w16select.o widget.o xfont.o ftfont.o xftfont.o ftxfont.o gtkutil.o \
+--- 356,362 ----
+  SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
+    xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
+    fontset.o dbusbind.o cygw32.o \
+!   nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o \
+    w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
+    w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
+    w16select.o widget.o xfont.o ftfont.o xftfont.o ftxfont.o gtkutil.o \
+diff -r -N -p ../emacs-24.3.org/src/keyboard.c src/keyboard.c
+*** ../emacs-24.3.org/src/keyboard.c	2013-02-13 13:25:53.000000000 +0900
+--- src/keyboard.c	2013-04-13 21:49:53.000000000 +0900
+*************** kbd_buffer_get_event (KBOARD **kbp,
+*** 3862,3869 ****
+          {
+            if (event->code == KEY_NS_PUT_WORKING_TEXT)
+              obj = Fcons (intern ("ns-put-working-text"), Qnil);
+!           else
+              obj = Fcons (intern ("ns-unput-working-text"), Qnil);
+  	  kbd_fetch_ptr = event + 1;
+            if (used_mouse_menu)
+              *used_mouse_menu = 1;
+--- 3862,3871 ----
+          {
+            if (event->code == KEY_NS_PUT_WORKING_TEXT)
+              obj = Fcons (intern ("ns-put-working-text"), Qnil);
+!           else if (event->code == KEY_NS_UNPUT_WORKING_TEXT)
+              obj = Fcons (intern ("ns-unput-working-text"), Qnil);
++ 	  else if (event->code == KEY_NS_PUT_MARKED_TEXT)
++ 	    obj = Fcons (intern ("ns-put-marked-text"), event->arg);
+  	  kbd_fetch_ptr = event + 1;
+            if (used_mouse_menu)
+              *used_mouse_menu = 1;
+*************** keys_of_keyboard (void)
+*** 12088,12093 ****
+--- 12090,12097 ----
+  			    "ns-put-working-text");
+    initial_define_lispy_key (Vspecial_event_map, "ns-unput-working-text",
+  			    "ns-unput-working-text");
++   initial_define_lispy_key (Vspecial_event_map, "ns-put-marked-text",
++ 			    "ns-put-marked-text");
+    /* Here we used to use `ignore-event' which would simple set prefix-arg to
+       current-prefix-arg, as is done in `handle-switch-frame'.
+       But `handle-switch-frame is not run from the special-map.
+diff -r -N -p ../emacs-24.3.org/src/macim.m src/macim.m
+*** ../emacs-24.3.org/src/macim.m	1970-01-01 09:00:00.000000000 +0900
+--- src/macim.m	2013-04-13 21:50:24.000000000 +0900
+***************
+*** 0 ****
+--- 1,184 ----
++ /* Implementation of Input Method Extension for MacOS X.
++    Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
++    Taiichi Hashimoto <taiichi2 at mac.com>.
++ */
++ 
++ #include "config.h"
++ 
++ #ifdef NS_IMPL_COCOA
++ 
++ #include <math.h>
++ #include <sys/types.h>
++ #include <time.h>
++ #include <signal.h>
++ #include <unistd.h>
++ 
++ #include <Carbon/Carbon.h>
++ 
++ #include "lisp.h"
++ #include "blockinput.h"
++ 
++ enum output_method
++ {
++   output_initial,
++   output_termcap,
++   output_x_window,
++   output_msdos_raw,
++   output_w32,
++   output_mac,
++   output_ns
++ } output_method;
++ 
++ #include "termhooks.h"
++ #include "keyboard.h"
++ #include "buffer.h"
++ 
++ //extern Lisp_Object Qcurrent_input_method;
++ //extern int cursor_in_echo_area;
++ static Lisp_Object Qmac_keys_passed_to_system;
++ 
++ void mac_init_input_method ();
++ int mac_pass_key_to_system (int code, int modifiers);
++ int mac_pass_key_directly_to_emacs ();
++ int mac_store_change_input_method_event ();
++ 
++ DEFUN ("mac-input-source-is-ascii-capable", Fmac_input_source_is_ascii_capable, Smac_input_source_is_ascii_capable,
++        0, 0, 0,
++        doc: /* Is current input source ascii capable? */)
++      (void)
++ {
++   TISInputSourceRef is = TISCopyCurrentKeyboardInputSource();
++   CFBooleanRef ret = TISGetInputSourceProperty(is, kTISPropertyInputSourceIsASCIICapable);
++   
++   return CFBooleanGetValue(ret)? Qt : Qnil;
++ }
++ 
++ DEFUN ("mac-get-input-source-list", Fmac_get_input_source_list, Smac_get_input_source_list,
++        0, 0, 0,
++        doc: /* get input source list on MacOSX */)
++      (void)
++ {
++   NSArray *is_list = (NSArray *)TISCreateInputSourceList(NULL, false);
++   int list_size = [is_list count];
++   Lisp_Object list[list_size];
++   int i;
++ 
++   for (i = 0; i < list_size; i++) {
++     TISInputSourceRef is = (TISInputSourceRef)[is_list objectAtIndex:i];
++     NSString *id = (NSString *)TISGetInputSourceProperty(is, kTISPropertyInputSourceID);
++     list[i] = make_string([id UTF8String],
++ 			  [id lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
++   }
++ 
++   return Flist(list_size, list);
++ }
++ 
++ DEFUN ("mac-get-current-input-source", Fmac_get_current_input_source, Smac_get_current_input_source,
++        0, 0, 0,
++        doc: /* get current input source on MacOSX */)
++      (void)
++ {
++   TISInputSourceRef is = TISCopyCurrentKeyboardInputSource();
++   NSString *id = (NSString *)TISGetInputSourceProperty(is, kTISPropertyInputSourceID);
++ 
++   return make_string([id UTF8String],
++ 		     [id lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
++ }
++ 
++ DEFUN ("mac-toggle-input-source", Fmac_toggle_input_source, Smac_toggle_input_source,
++        1, 1, 0,
++        doc: /* toggle input source on MacOSX */)
++      (arg)
++      Lisp_Object arg;
++ {
++   TISInputSourceRef is = NULL;
++ 
++   if (NILP (arg))
++     {
++       is = TISCopyCurrentASCIICapableKeyboardInputSource();
++     }
++   else
++     {
++       NSString *locale;
++       NSArray *languages = [NSLocale preferredLanguages];
++       if (languages != nil) {
++ 	  locale = [languages objectAtIndex:0];
++       } else {
++ 	  locale = [[NSLocale currentLocale]
++ 		  	objectForKey:NSLocaleLanguageCode];
++       }
++       is = TISCopyInputSourceForLanguage((CFStringRef)locale);
++     }
++   if (is) TISSelectInputSource(is);
++ 
++   return arg;
++ }
++ 
++ int
++ mac_store_change_input_method_event ()
++ {
++   Lisp_Object dim;
++   int ret = FALSE;
++   
++   dim = Fsymbol_value (intern ("default-input-method"));
++   if (STRINGP (dim) && strcmp(SDATA (dim), "MacOSX") == 0)
++     {
++       ret = TRUE;
++     }
++ 
++   return ret;
++ }
++ 
++ int
++ mac_pass_key_to_system (int code, int modifiers)
++ {
++   Lisp_Object keys = Fsymbol_value (Qmac_keys_passed_to_system);
++   Lisp_Object m, k; 
++ 
++   while (!NILP (keys))
++     {
++       m = XCAR (XCAR (keys));
++       k = XCDR (XCAR (keys));
++       keys = XCDR (keys);
++ 
++       if (NUMBERP (m) && modifiers == XINT (m))
++ 	if (NILP (k)
++ 	    || (NUMBERP (k) && code == XINT (k)))
++ 	  return TRUE;
++     }
++   
++   return FALSE;
++ }
++ 
++ int
++ mac_pass_key_directly_to_emacs (void)
++ {
++ 
++   if (NILP (Fmac_input_source_is_ascii_capable()))
++     {
++       if (NILP (Vmac_use_input_method_on_system)
++ 	  || this_command_key_count 
++ 	  || cursor_in_echo_area 
++ 	  || !NILP (BVAR (current_buffer, read_only)))
++ 	return TRUE;
++     }
++ 
++   return FALSE;
++ }
++ 
++ 
++ void mac_init_input_method (void)
++ {
++   Qmac_keys_passed_to_system = intern ("mac-keys-passed-to-system");
++   staticpro (&Qmac_keys_passed_to_system);
++ 
++   DEFVAR_LISP ("mac-use-input-method-on-system", Vmac_use_input_method_on_system,
++                doc: /* If it is non-nil, use input method on system. */);
++   Vmac_use_input_method_on_system = Qt;
++ 
++   defsubr (&Smac_input_source_is_ascii_capable);
++   defsubr (&Smac_get_input_source_list);
++   defsubr (&Smac_get_current_input_source);
++   defsubr (&Smac_toggle_input_source);
++ }
++ #endif
+diff -r -N -p ../emacs-24.3.org/src/nsfns.m src/nsfns.m
+*** ../emacs-24.3.org/src/nsfns.m	2013-01-02 05:37:17.000000000 +0900
+--- src/nsfns.m	2013-04-13 21:49:53.000000000 +0900
+*************** static ptrdiff_t image_cache_refcount;
+*** 107,113 ****
+  
+     ========================================================================== */
+  
+- 
+  void
+  check_ns (void)
+  {
+--- 107,112 ----
+*************** be used as the image of the icon represe
+*** 2702,2707 ****
+--- 2701,2724 ----
+                 doc: /* Toolkit version for NS Windowing.  */);
+    Vns_version_string = ns_appkit_version_str ();
+  
++ 
++   DEFVAR_LISP ("ns-shift-key-mask", Vns_shift_key_mask,
++                doc: /* Shift key mask defined in system. */);
++   Vns_shift_key_mask = make_number (NSShiftKeyMask);
++ 
++   DEFVAR_LISP ("ns-control-key-mask", Vns_control_key_mask,
++                doc: /* Control key mask defined in system. */);
++   Vns_control_key_mask = make_number (NSControlKeyMask);
++ 
++   DEFVAR_LISP ("ns-alternate-key-mask", Vns_alternate_key_mask,
++                doc: /* Alternate key mask defined in system. */);
++   Vns_alternate_key_mask = make_number (NSAlternateKeyMask);
++ 
++   DEFVAR_LISP ("ns-command-key-mask", Vns_command_key_mask,
++                doc: /* Command key mask defined in system. */);
++   Vns_command_key_mask = make_number (NSCommandKeyMask);
++ 
++ 
+    defsubr (&Sns_read_file_name);
+    defsubr (&Sns_get_resource);
+    defsubr (&Sns_set_resource);
+*************** be used as the image of the icon represe
+*** 2746,2751 ****
+--- 2763,2772 ----
+    defsubr (&Sx_show_tip);
+    defsubr (&Sx_hide_tip);
+  
++ #ifdef NS_IMPL_COCOA
++   mac_init_input_method ();
++ #endif
++ 
+    /* used only in fontset.c */
+    check_window_system_func = check_ns;
+  
+diff -r -N -p ../emacs-24.3.org/src/nsterm.h src/nsterm.h
+*** ../emacs-24.3.org/src/nsterm.h	2013-01-02 05:37:17.000000000 +0900
+--- src/nsterm.h	2013-04-13 21:49:53.000000000 +0900
+*************** typedef unsigned int NSUInteger;
+*** 420,425 ****
+--- 420,427 ----
+  #define KEY_NS_NEW_FRAME               ((1<<28)|(0<<16)|12)
+  #define KEY_NS_TOGGLE_TOOLBAR          ((1<<28)|(0<<16)|13)
+  #define KEY_NS_SHOW_PREFS              ((1<<28)|(0<<16)|14)
++ #define KEY_MAC_CHANGE_INPUT_METHOD    ((1<<28)|(0<<16)|15)
++ #define KEY_NS_PUT_MARKED_TEXT         ((1<<28)|(0<<16)|16)
+  
+  /* could use list to store these, but rest of emacs has a big infrastructure
+     for managing a table of bitmap "records" */
+diff -r -N -p ../emacs-24.3.org/src/nsterm.m src/nsterm.m
+*** ../emacs-24.3.org/src/nsterm.m	2013-01-04 18:38:13.000000000 +0900
+--- src/nsterm.m	2013-04-13 21:53:51.000000000 +0900
+*************** ns_term_init (Lisp_Object display_name)
+*** 4049,4054 ****
+--- 4049,4057 ----
+    /*   [[NSNotificationCenter defaultCenter] addObserver: NSApp
+                                           selector: @selector (logNotification:)
+                                               name: nil object: nil]; */
++   [[NSDistributedNotificationCenter defaultCenter] addObserver: NSApp
++ 					selector: @selector (changeInputMethod:)
++ 						   name: @"AppleSelectedInputSourcesChangedNotification" object: nil];
+  
+    dpyinfo = xzalloc (sizeof *dpyinfo);
+  
+*************** ns_term_shutdown (int sig)
+*** 4278,4283 ****
+--- 4281,4301 ----
+      NSLog (@"notification: '%@'", [notification name]);
+  }
+  
++ - (void)changeInputMethod: (NSNotification *)notification
++ {
++ 
++   struct frame *emacsframe = SELECTED_FRAME ();
++ 
++   if (mac_store_change_input_method_event())
++     {
++       if (!emacs_event)
++ 	return;
++       emacs_event->kind = NS_NONKEY_EVENT;
++       emacs_event->code = KEY_MAC_CHANGE_INPUT_METHOD;
++       emacs_event->modifiers = 0;
++       EV_TRAILER ((id)nil);
++     }
++ }
+  
+  - (void)sendEvent: (NSEvent *)theEvent
+  /* --------------------------------------------------------------------------
+*************** not_in_argv (NSString *arg)
+*** 4957,4963 ****
+               code, fnKeysym, flags, emacs_event->modifiers);
+  
+        /* if it was a function key or had modifiers, pass it directly to emacs */
+!       if (fnKeysym || (emacs_event->modifiers
+                         && (emacs_event->modifiers != shift_modifier)
+                         && [[theEvent charactersIgnoringModifiers] length] > 0))
+  /*[[theEvent characters] length] */
+--- 4975,4982 ----
+               code, fnKeysym, flags, emacs_event->modifiers);
+  
+        /* if it was a function key or had modifiers, pass it directly to emacs */
+!       if (mac_pass_key_directly_to_emacs ()
+! 	  ||fnKeysym || (emacs_event->modifiers
+                         && (emacs_event->modifiers != shift_modifier)
+                         && [[theEvent charactersIgnoringModifiers] length] > 0))
+  /*[[theEvent characters] length] */
+*************** not_in_argv (NSString *arg)
+*** 4972,4979 ****
+                ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT;
+  
+            emacs_event->code = code;
+!           EV_TRAILER (theEvent);
+!           return;
+          }
+      }
+  
+--- 4991,5008 ----
+                ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT;
+  
+            emacs_event->code = code;
+! 	  /* The function mac_pass_key_to_system decides 
+! 	     whether it is passed directly to emacs or not. */
+! 	  if (emacs_event->kind == NON_ASCII_KEYSTROKE_EVENT
+! 	      || !mac_pass_key_to_system (code, flags
+! 					  & (NSShiftKeyMask
+! 					     | NSControlKeyMask
+! 					     | NSAlternateKeyMask
+! 					     | NSCommandKeyMask)))
+! 	    {
+! 	      EV_TRAILER (theEvent);
+! 	      return;
+! 	    }
+          }
+      }
+  
+*************** not_in_argv (NSString *arg)
+*** 5067,5076 ****
+      NSLog (@"setMarkedText '%@' len =%d range %d from %d", str, [str length],
+             selRange.length, selRange.location);
+  
+-   if (workingText != nil)
+-     [self deleteWorkingText];
+    if ([str length] == 0)
+!     return;
+  
+    if (!emacs_event)
+      return;
+--- 5096,5114 ----
+      NSLog (@"setMarkedText '%@' len =%d range %d from %d", str, [str length],
+             selRange.length, selRange.location);
+  
+    if ([str length] == 0)
+!     {
+!       [self deleteWorkingText];
+!       return;
+!     }
+!   else
+!     {
+!       if (workingText != nil) {
+! 	[workingText release];
+! 	workingText = nil;
+! 	processingCompose = NO;
+!       }
+!     }
+  
+    if (!emacs_event)
+      return;
+*************** not_in_argv (NSString *arg)
+*** 5080,5086 ****
+    ns_working_text = build_string ([workingText UTF8String]);
+  
+    emacs_event->kind = NS_TEXT_EVENT;
+!   emacs_event->code = KEY_NS_PUT_WORKING_TEXT;
+    EV_TRAILER ((id)nil);
+  }
+  
+--- 5118,5126 ----
+    ns_working_text = build_string ([workingText UTF8String]);
+  
+    emacs_event->kind = NS_TEXT_EVENT;
+!   emacs_event->code = KEY_NS_PUT_MARKED_TEXT;
+!   emacs_event->arg = Fcons (make_number (selRange.location),
+! 			    Fcons (make_number (selRange.length), Qnil));
+    EV_TRAILER ((id)nil);
+  }
+  
+*************** not_in_argv (NSString *arg)
+*** 5135,5149 ****
+  {
+    NSRect rect;
+    NSPoint pt;
+!   struct window *win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
+    if (NS_KEYLOG)
+      NSLog (@"firstRectForCharRange request");
+  
+    rect.size.width = theRange.length * FRAME_COLUMN_WIDTH (emacsframe);
+    rect.size.height = FRAME_LINE_HEIGHT (emacsframe);
+    pt.x = WINDOW_TEXT_TO_FRAME_PIXEL_X (win, win->phys_cursor.x);
+    pt.y = WINDOW_TO_FRAME_PIXEL_Y (win, win->phys_cursor.y
+!                                        +FRAME_LINE_HEIGHT (emacsframe));
+  
+    pt = [self convertPoint: pt toView: nil];
+    pt = [[self window] convertBaseToScreen: pt];
+--- 5175,5197 ----
+  {
+    NSRect rect;
+    NSPoint pt;
+!   //  struct window *win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
+!   struct window *win;
+    if (NS_KEYLOG)
+      NSLog (@"firstRectForCharRange request");
++     
++   if (NILP (Vmac_in_echo_area))
++     win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
++     else if (WINDOWP (echo_area_window))
++     win = XWINDOW (echo_area_window);
++   else
++     win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
+  
+    rect.size.width = theRange.length * FRAME_COLUMN_WIDTH (emacsframe);
+    rect.size.height = FRAME_LINE_HEIGHT (emacsframe);
+    pt.x = WINDOW_TEXT_TO_FRAME_PIXEL_X (win, win->phys_cursor.x);
+    pt.y = WINDOW_TO_FRAME_PIXEL_Y (win, win->phys_cursor.y
+!                                        +FRAME_LINE_HEIGHT (emacsframe)+2);
+  
+    pt = [self convertPoint: pt toView: nil];
+    pt = [[self window] convertBaseToScreen: pt];
+*************** variable `x-use-underline-position-prope
+*** 7173,7178 ****
+--- 7221,7230 ----
+  baseline level.  The default value is nil.  */);
+    x_underline_at_descent_line = 0;
+  
++   DEFVAR_LISP ("mac-in-echo-area", Vmac_in_echo_area,
++                doc: /* state of cursor in echo area. */);
++   Vmac_in_echo_area = Qnil;
++ 
+    /* Tell emacs about this window system. */
+    Fprovide (intern ("ns"), Qnil);
+  }
+*** ../emacs-24.3.org/configure	2013-03-08 17:13:36.000000000 +0900
+--- configure	2013-04-13 23:11:56.000000000 +0900
+*************** if test "${HAVE_NS}" = yes; then
+*** 9650,9656 ****
+       leimdir="\${ns_appresdir}/leim"
+       INSTALL_ARCH_INDEP_EXTRA=
+    fi
+!   NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
+  fi
+  CFLAGS="$tmp_CFLAGS"
+  CPPFLAGS="$tmp_CPPFLAGS"
+--- 9650,9656 ----
+       leimdir="\${ns_appresdir}/leim"
+       INSTALL_ARCH_INDEP_EXTRA=
+    fi
+!   NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o"
+  fi
+  CFLAGS="$tmp_CFLAGS"
+  CPPFLAGS="$tmp_CPPFLAGS"
+*************** case "$opsys" in
+*** 24618,24624 ****
+     ## 0x690 is the total size of 30 segment load commands (at 56
+     ## each); under Cocoa 31 commands are required.
+     if test "$HAVE_NS" = "yes"; then
+!      libs_nsgui="-framework AppKit"
+       headerpad_extra=6C8
+     else
+       libs_nsgui=
+--- 24618,24624 ----
+     ## 0x690 is the total size of 30 segment load commands (at 56
+     ## each); under Cocoa 31 commands are required.
+     if test "$HAVE_NS" = "yes"; then
+!      libs_nsgui="-framework AppKit -framework Carbon -framework Cocoa"
+       headerpad_extra=6C8
+     else
+       libs_nsgui=
+*** ../emacs-24.3.org/configure.ac	2013-03-05 17:24:59.000000000 +0900
+--- configure.ac	2013-04-13 23:11:56.000000000 +0900
+*************** if test "${HAVE_NS}" = yes; then
+*** 1571,1577 ****
+       leimdir="\${ns_appresdir}/leim"
+       INSTALL_ARCH_INDEP_EXTRA=
+    fi
+!   NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
+  fi
+  CFLAGS="$tmp_CFLAGS"
+  CPPFLAGS="$tmp_CPPFLAGS"
+--- 1571,1577 ----
+       leimdir="\${ns_appresdir}/leim"
+       INSTALL_ARCH_INDEP_EXTRA=
+    fi
+!   NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o"
+  fi
+  CFLAGS="$tmp_CFLAGS"
+  CPPFLAGS="$tmp_CPPFLAGS"
+*************** case "$opsys" in
+*** 4322,4328 ****
+     ## 0x690 is the total size of 30 segment load commands (at 56
+     ## each); under Cocoa 31 commands are required.
+     if test "$HAVE_NS" = "yes"; then
+!      libs_nsgui="-framework AppKit"
+       headerpad_extra=6C8
+     else
+       libs_nsgui=
+--- 4322,4328 ----
+     ## 0x690 is the total size of 30 segment load commands (at 56
+     ## each); under Cocoa 31 commands are required.
+     if test "$HAVE_NS" = "yes"; then
+!      libs_nsgui="-framework AppKit -framework Carbon -framework Cocoa"
+       headerpad_extra=6C8
+     else
+       libs_nsgui=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140927/f76804a3/attachment-0001.html>


More information about the macports-changes mailing list