Skip to content

Instantly share code, notes, and snippets.

@papaeye
Created June 16, 2012 18:18
Show Gist options
  • Save papaeye/2942146 to your computer and use it in GitHub Desktop.
Save papaeye/2942146 to your computer and use it in GitHub Desktop.
A patch to build emacs 23.4 with clang
diff --git a/src/nsfont.m b/src/nsfont.m
index aaec130..cecaa10 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1209,7 +1209,6 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
DPSstroke (context);
DPSgrestore (context);
- return to-from;
}
#else /* NS_IMPL_COCOA */
@@ -1278,10 +1277,10 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
}
CGContextRestoreGState (gcontext);
- return;
}
#endif /* NS_IMPL_COCOA */
+ return to-from;
}
diff --git a/src/nsimage.m b/src/nsimage.m
index a4535c5..f9a20e3 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -334,7 +334,7 @@ static EmacsImage *ImageList = nil;
NSColor *rgbColor;
if (bmRep == nil || color == nil)
- return;
+ return self;
if ([color colorSpaceName] != NSCalibratedRGBColorSpace)
rgbColor = [color colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
diff --git a/src/nsterm.m b/src/nsterm.m
index cfe82b6..76d35ab 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5431,7 +5431,7 @@ ns_term_shutdown (int sig)
NSTRACE (performDragOperation);
if (!emacs_event)
- return;
+ return NO;
position = [self convertPoint: [sender draggingLocation] fromView: nil];
x = lrint (position.x); y = lrint (position.y);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment