1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-14 16:50:58 +00:00

* nsselect.m (symbol_to_nsstring, clean_local_selection_data)

(ns_string_to_pasteboard_internal):
* nsmenu.m (process_dialog):
* nsimage.m (ns_load_image): Use SDATA and ASET where appropriate.
* nsfont.m (nsfont_open): Use XHASH to make it compile with LISP_UNION.
* lisp.h (Fx_load_color_file): Declare.
This commit is contained in:
Stefan Monnier 2009-04-13 18:45:12 +00:00
parent 96d98c408a
commit 86fa089ec0
6 changed files with 21 additions and 9 deletions

View File

@ -1,3 +1,12 @@
2009-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
* nsselect.m (symbol_to_nsstring, clean_local_selection_data)
(ns_string_to_pasteboard_internal):
* nsmenu.m (process_dialog):
* nsimage.m (ns_load_image): Use SDATA and ASET where appropriate.
* nsfont.m (nsfont_open): Use XHASH to make it compile with LISP_UNION.
* lisp.h (Fx_load_color_file): Declare.
2009-04-13 Kenichi Handa <handa@m17n.org>
* font.c (font_delete_unmatched): Preserve the order of list

View File

@ -3330,6 +3330,7 @@ EXFUN (Fx_focus_frame, 1);
/* Defined in xfaces.c */
EXFUN (Fclear_face_cache, 1);
EXFUN (Fx_load_color_file, 1);
extern void syms_of_xfaces P_ ((void));
#ifndef HAVE_GETLOADAVG

View File

@ -576,7 +576,9 @@ avoid creating multiple struct font objects (with metrics cache, etc.)
{
if (NSFONT_TRACE)
fprintf(stderr, "*** nsfont_open CACHE HIT!\n");
return (Lisp_Object)[cached unsignedLongValue];
// FIXME: Cast from (unsigned long) to Lisp_Object.
XHASH (font_object) = [cached unsignedLongValue];
return font_object;
}
else
{
@ -585,7 +587,7 @@ avoid creating multiple struct font objects (with metrics cache, etc.)
if (!synthItal)
[fontCache
setObject: [NSNumber numberWithUnsignedLong:
(unsigned long)font_object]
(unsigned long) XHASH (font_object)]
forKey: nsfont];
}

View File

@ -93,7 +93,7 @@ Updated by Christian Limpach (chris@nice.ch)
}
else
{
NSData *data = [NSData dataWithBytes: XSTRING (spec_data)->data
NSData *data = [NSData dataWithBytes: SDATA (spec_data)
length: SBYTES (spec_data)];
eImg = [[EmacsImage alloc] initWithData: data];
[eImg setPixmapData];

View File

@ -1717,11 +1717,11 @@ void process_dialog (id window, Lisp_Object list)
item = XCAR (list);
if (XTYPE (item) == Lisp_String)
{
[window addString: XSTRING (item)->data row: row++];
[window addString: SDATA (item) row: row++];
}
else if (XTYPE (item) == Lisp_Cons)
{
[window addButton: XSTRING (XCAR (item))->data
[window addButton: SDATA (XCAR (item))
value: XCDR (item) row: row++];
}
else if (NILP (item))
@ -1811,7 +1811,7 @@ void process_dialog (id window, Lisp_Object list)
if (XTYPE (head) == Lisp_String)
[title setStringValue:
[NSString stringWithUTF8String: XSTRING (head)->data]];
[NSString stringWithUTF8String: SDATA (head)]];
else if (isQ == YES)
[title setStringValue: @"Question"];
else

View File

@ -62,7 +62,7 @@ Updated by Christian Limpach (chris@nice.ch)
if (EQ (sym, QPRIMARY)) return NSGeneralPboard;
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
if (EQ (sym, QTEXT)) return NSStringPboardType;
return [NSString stringWithUTF8String: XSTRING (XSYMBOL (sym)->xname)->data];
return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
}
@ -113,7 +113,7 @@ Updated by Christian Limpach (chris@nice.ch)
return clean_local_selection_data (AREF (obj, 0));
copy = Fmake_vector (make_number (size), Qnil);
for (i = 0; i < size; i++)
AREF (copy, i) = clean_local_selection_data (AREF (obj, i));
ASET (copy, i, clean_local_selection_data (AREF (obj, i)));
return copy;
}
@ -150,7 +150,7 @@ Updated by Christian Limpach (chris@nice.ch)
CHECK_STRING (str);
utfStr = XSTRING (str)->data;
utfStr = SDATA (str);
nsStr = [NSString stringWithUTF8String: utfStr];
if (gtype == nil)