aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdrian Robert2008-08-21 02:48:58 +0000
committerAdrian Robert2008-08-21 02:48:58 +0000
commitf2f7f42c63a747066931b953b0425fa298d7ff95 (patch)
tree73f8a1113434ae9b9f16a340876570d42489a292 /src
parent795d93585c7129fc45d369ec0843c84212fca213 (diff)
downloademacs-f2f7f42c63a747066931b953b0425fa298d7ff95.tar.gz
emacs-f2f7f42c63a747066931b953b0425fa298d7ff95.zip
* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/nsfns.m16
-rw-r--r--src/nsfont.m4
-rw-r--r--src/nsterm.h6
-rw-r--r--src/nsterm.m33
5 files changed, 54 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1001872d48f..a9cb2d45225 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12008-08-20 Adrian Robert <Adrian.B.Robert@gmail.com>
2
3 * nsfns.m (ns-read-file-name): Add casts to avoid warning.
4 (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly.
5 * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil.
6 * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration.
7 (EmacsApp-cursor_blink_handler): Remove declaration.
8 * nsterm.m (ns_draw_glyph_string): Update first conditional body to
9 match 01 Feb 2008 changes in xterm.c.
10 (ns_read_socket): Add cast to avoid warning.
11 (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on
12 GNUstep.
13
12008-08-20 Chong Yidong <cyd@stupidchicken.com> 142008-08-20 Chong Yidong <cyd@stupidchicken.com>
2 15
3 * xselect.c (x_get_foreign_selection): Return nil if desired 16 * xselect.c (x_get_foreign_selection): Return nil if desired
diff --git a/src/nsfns.m b/src/nsfns.m
index d9909330b2e..bd705b53868 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1440,7 +1440,7 @@ Optional arg INIT, if non-nil, provides a default file name to use. */)
1440 dirS = [dirS stringByExpandingTildeInPath]; 1440 dirS = [dirS stringByExpandingTildeInPath];
1441 1441
1442 panel = NILP (isLoad) ? 1442 panel = NILP (isLoad) ?
1443 [EmacsSavePanel savePanel] : [EmacsOpenPanel openPanel]; 1443 (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel];
1444 1444
1445 [panel setTitle: promptS]; 1445 [panel setTitle: promptS];
1446 1446
@@ -1988,11 +1988,21 @@ DEFUN ("ns-convert-utf8-nfd-to-nfc", Fns_convert_utf8_nfd_to_nfc,
1988 (str) 1988 (str)
1989 Lisp_Object str; 1989 Lisp_Object str;
1990{ 1990{
1991/* TODO: If GNUstep ever implements precomposedStringWithCanonicalMapping,
1992 remove this. */
1991 NSString *utfStr; 1993 NSString *utfStr;
1992 1994
1993 CHECK_STRING (str); 1995 CHECK_STRING (str);
1994 utfStr = [[NSString stringWithUTF8String: SDATA (str)] 1996 utfStr = [NSString stringWithUTF8String: SDATA (str)];
1995 precomposedStringWithCanonicalMapping]; 1997 if (![utfStr respondsToSelector:
1998 @selector (precomposedStringWithCanonicalMapping)])
1999 {
2000 message1
2001 ("Warning: ns-convert-utf8-nfd-to-nfc unsupported under GNUstep.\n");
2002 return Qnil;
2003 }
2004 else
2005 utfStr = [utfStr precomposedStringWithCanonicalMapping];
1996 return build_string ([utfStr UTF8String]); 2006 return build_string ([utfStr UTF8String]);
1997} 2007}
1998 2008
diff --git a/src/nsfont.m b/src/nsfont.m
index 0fb98d77180..f49cd0ffbda 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1016,13 +1016,13 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
1016 /* do underline */ 1016 /* do underline */
1017 if (face->underline_p) 1017 if (face->underline_p)
1018 { 1018 {
1019 if (face->underline_color != nil) 1019 if (face->underline_color != 0)
1020 [ns_lookup_indexed_color (face->underline_color, s->f) set]; 1020 [ns_lookup_indexed_color (face->underline_color, s->f) set];
1021 else 1021 else
1022 [col set]; 1022 [col set];
1023 DPSmoveto (context, r.origin.x, r.origin.y + font->underpos); 1023 DPSmoveto (context, r.origin.x, r.origin.y + font->underpos);
1024 DPSlineto (context, r.origin.x+r.size.width, r.origin.y+font->underpos); 1024 DPSlineto (context, r.origin.x+r.size.width, r.origin.y+font->underpos);
1025 if (face->underline_color != nil) 1025 if (face->underline_color != 0)
1026 [col set]; 1026 [col set];
1027 } 1027 }
1028 else 1028 else
diff --git a/src/nsterm.h b/src/nsterm.h
index 224d15fd527..97db10ce338 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -41,7 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41- (void)showPreferencesWindow: (id)sender; 41- (void)showPreferencesWindow: (id)sender;
42- (BOOL) openFile: (NSString *)fileName; 42- (BOOL) openFile: (NSString *)fileName;
43- (void)fd_handler: (NSTimer *) fdEntry; 43- (void)fd_handler: (NSTimer *) fdEntry;
44- (void)cursor_blink_handler: (NSTimer *)cursorEntry;
45- (void)timeout_handler: (NSTimer *)timedEntry; 44- (void)timeout_handler: (NSTimer *)timedEntry;
46- (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg; 45- (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg;
47@end 46@end
@@ -83,6 +82,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
83- (void) setWindowClosing: (BOOL)closing; 82- (void) setWindowClosing: (BOOL)closing;
84- (EmacsToolbar *) toolbar; 83- (EmacsToolbar *) toolbar;
85- (void) deleteWorkingText; 84- (void) deleteWorkingText;
85
86#ifdef NS_IMPL_GNUSTEP
87/* Not declared, but useful. */
88- (void) unlockFocusNeedsFlush: (BOOL)needs;
89#endif
86@end 90@end
87 91
88 92
diff --git a/src/nsterm.m b/src/nsterm.m
index 561a9b62883..c077c1aedda 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2273,7 +2273,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2273 struct frame *f = WINDOW_XFRAME (w); 2273 struct frame *f = WINDOW_XFRAME (w);
2274 struct glyph *phys_cursor_glyph; 2274 struct glyph *phys_cursor_glyph;
2275 int overspill; 2275 int overspill;
2276 unsigned char drawGlyph = 0, cursorType, oldCursorType; 2276 char drawGlyph = 0, cursorType, oldCursorType;
2277 int new_cursor_type; 2277 int new_cursor_type;
2278 int new_cursor_width; 2278 int new_cursor_width;
2279 int active_cursor; 2279 int active_cursor;
@@ -2928,13 +2928,21 @@ ns_draw_glyph_string (struct glyph_string *s)
2928 2928
2929 NSTRACE (ns_draw_glyph_string); 2929 NSTRACE (ns_draw_glyph_string);
2930 2930
2931 if (s->next && s->right_overhang && !s->for_overlaps && s->hl != DRAW_CURSOR) 2931 if (s->next && s->right_overhang && !s->for_overlaps/* && s->hl != DRAW_CURSOR*/)
2932 { 2932 {
2933 xassert (s->next->img == NULL); 2933 int width;
2934 n = ns_get_glyph_string_clip_rect (s->next, r); 2934 struct glyph_string *next;
2935 ns_focus (s->f, r, n); 2935
2936 ns_maybe_dumpglyphs_background (s->next, 1); 2936 for (width = 0, next = s->next; next;
2937 ns_unfocus (s->f); 2937 width += next->width, next = next->next)
2938 if (next->first_glyph->type != IMAGE_GLYPH)
2939 {
2940 n = ns_get_glyph_string_clip_rect (s->next, r);
2941 ns_focus (s->f, r, n);
2942 ns_maybe_dumpglyphs_background (s->next, 1);
2943 ns_unfocus (s->f);
2944 next->num_clips = 0;
2945 }
2938 } 2946 }
2939 2947
2940 if (!s->for_overlaps && s->face->box != FACE_NO_BOX 2948 if (!s->for_overlaps && s->face->box != FACE_NO_BOX
@@ -3044,6 +3052,7 @@ ns_draw_glyph_string (struct glyph_string *s)
3044 ns_unfocus (s->f); 3052 ns_unfocus (s->f);
3045 } 3053 }
3046 3054
3055 s->num_clips = 0;
3047} 3056}
3048 3057
3049 3058
@@ -3149,7 +3158,7 @@ ns_read_socket (struct terminal *terminal, int expected,
3149 3158
3150 /* If have pending open-file requests, attend to the next one of those. */ 3159 /* If have pending open-file requests, attend to the next one of those. */
3151 if (ns_pending_files && [ns_pending_files count] != 0 3160 if (ns_pending_files && [ns_pending_files count] != 0
3152 && [NSApp openFile: [ns_pending_files objectAtIndex: 0]]) 3161 && [(EmacsApp *)NSApp openFile: [ns_pending_files objectAtIndex: 0]])
3153 { 3162 {
3154 [ns_pending_files removeObjectAtIndex: 0]; 3163 [ns_pending_files removeObjectAtIndex: 0];
3155 } 3164 }
@@ -4194,11 +4203,11 @@ fprintf (stderr, "res = %d\n", EQ (res, Qt)); /* FIXME */
4194 while ((file = [files nextObject]) != nil) 4203 while ((file = [files nextObject]) != nil)
4195 [ns_pending_files addObject: file]; 4204 [ns_pending_files addObject: file];
4196 4205
4197#ifdef NS_IMPL_GNUSTEP 4206/* TODO: when GNUstep implements this (and we require that version of
4198 [self replyToOpenOrPrint: 0]; 4207 GNUstep), remove. */
4199#else 4208#ifndef NS_IMPL_GNUSTEP
4200 [self replyToOpenOrPrint: NSApplicationDelegateReplySuccess]; 4209 [self replyToOpenOrPrint: NSApplicationDelegateReplySuccess];
4201#endif /* NS_IMPL_GNUSTEP */ 4210#endif /* !NS_IMPL_GNUSTEP */
4202 4211
4203} 4212}
4204 4213