1. At the time of writing (25nov2007), the CVS HEAD version of GNU Emacs' Carbon version is broken (unusably slow keyboard handling). Older versions work, but not natively on Leopard, undumping doesn't work.

  2. Furthermore, since roughly April 2007 the Carbon version is configured to use Core Graphics, which sucks for rendering fonts, blurs them to unreadability with anti-aliasing and renders them wrong without.

  3. I used this hack-patch on a checkout of 2007-08-01 to disable Core Graphics and use a recent undumper:

  4. Index: src/macgui.h
    ===================================================================
    RCS file: /sources/emacs/emacs/src/macgui.h,v
    retrieving revision 1.41
    diff -u -r1.41 macgui.h
    --- src/macgui.h    26 Jul 2007 05:27:54 -0000  1.41
    +++ src/macgui.h    24 Nov 2007 19:19:18 -0000
    @@ -79,6 +79,10 @@
     #include <Gestalt.h>
     #endif /* not HAVE_CARBON */
    
  5. +#define USE_ATSUI 0
    +#define USE_CG_TEXT_DRAWING 0
    +#define USE_CG_DRAWING 0
    +
     /* Whether to use ATSUI (Apple Type Services for Unicode Imaging) for
        text drawing.  */
     #ifndef USE_ATSUI
    @@ -103,6 +107,7 @@
     #endif
     #endif
    
  6. +
     /* Whether to use the standard Font Panel floating dialog.  */
     #ifndef USE_MAC_FONT_PANEL
     #if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
    Index: src/unexmacosx.c
    ===================================================================
    RCS file: /sources/emacs/emacs/src/unexmacosx.c,v
    retrieving revision 1.23
    diff -u -r1.23 unexmacosx.c
    --- src/unexmacosx.c    26 Jul 2007 05:27:58 -0000  1.23
    +++ src/unexmacosx.c    24 Nov 2007 19:19:18 -0000
    @@ -443,15 +443,13 @@
    
  7.    while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
         {
    -      /* Subtract the size of trailing null pages from filesize.  It
    +      /* Subtract the size of trailing null bytes from filesize.  It
         can be smaller than vmsize in segment commands.  In such a
    -    case, trailing pages are initialized with zeros.  */
    -      for (p = ranges->address + ranges->size; p > ranges->address;
    -      p -= sizeof (int))
    -   if (*(((int *) p)-1))
    -     break;
    -      filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address);
    -      assert (filesize <= ranges->size);
    +    case, trailing bytes are initialized with zeros.  */
    +      for (p = ranges->address + ranges->size; p > ranges->address; p--)
    +       if (*(((char *) p)-1))
    +         break;
    +      filesize = p - ranges->address;
    
  8.        unexec_regions[num_unexec_regions].filesize = filesize;
           unexec_regions[num_unexec_regions++].range = *ranges;
    @@ -503,11 +501,19 @@
     {
       int i, n;
       unexec_region_info r;
    +  vm_size_t padsize;
    
  9.    qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]),
         &unexec_regions_sort_compare);
       n = 0;
       r = unexec_regions[0];
    +  padsize = r.range.address & (pagesize - 1);
    +  if (padsize)
    +    {
    +      r.range.address -= padsize;
    +      r.range.size += padsize;
    +      r.filesize += padsize;
    +    }
       for (i = 1; i < num_unexec_regions; i++)
         {
           if (r.range.address + r.range.size == unexec_regions[i].range.address
    @@ -520,6 +526,17 @@
        {
          unexec_regions[n++] = r;
          r = unexec_regions[i];
    +     padsize = r.range.address & (pagesize - 1);
    +     if (padsize)
    +       {
    +         if ((unexec_regions[n-1].range.address
    +          + unexec_regions[n-1].range.size) == r.range.address)
    +       unexec_regions[n-1].range.size -= padsize;
    +
    +         r.range.address -= padsize;
    +         r.range.size += padsize;
    +         r.filesize += padsize;
    +       }
        }
         }
       unexec_regions[n++] = r;
    @@ -562,6 +579,11 @@
         case LC_TWOLEVEL_HINTS:
           printf ("LC_TWOLEVEL_HINTS");
           break;
    +#ifdef LC_UUID
    +    case LC_UUID:
    +      printf ("LC_UUID          ");
    +      break;
    +#endif
         default:
           printf ("unknown          ");
         }