[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src nsfns.m nsmenu.m nsfont.m ChangeLog
From: |
Adrian Robert |
Subject: |
[Emacs-diffs] emacs/src nsfns.m nsmenu.m nsfont.m ChangeLog |
Date: |
Fri, 13 Feb 2009 13:30:40 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Adrian Robert <arobert> 09/02/13 13:30:39
Modified files:
src : nsfns.m nsmenu.m nsfont.m ChangeLog
Log message:
* nsfns.m (ns-read-file-name): BLOCK_INPUT while showing dialog. \n \n*
nsmenu.m (pop_down_menu): Check popup_activated_flag. \n(ns_popup_dialog,
EmacsDialogPanel-runDialogAt:): Let \npop_down_menu do the cleanup work as it
is always called. (Bug#2154) \n \n* nsfont.m (nsfont_make_fontset_for_font):
For now, don't try to \nset fontset font for 'mathematical-' sub-scripts. (Bug
#2218)\n
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsfns.m?cvsroot=emacs&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsmenu.m?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsfont.m?cvsroot=emacs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7357&r2=1.7358
Patches:
Index: nsfns.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsfns.m,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- nsfns.m 23 Jan 2009 09:58:03 -0000 1.36
+++ nsfns.m 13 Feb 2009 13:30:35 -0000 1.37
@@ -1449,7 +1449,7 @@
static id fileDelegate = nil;
int ret;
id panel;
- NSString *fname;
+ Lisp_Object fname;
NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil :
[NSString stringWithUTF8String: SDATA (prompt)];
@@ -1482,6 +1482,7 @@
[panel setDelegate: fileDelegate];
panelOK = 0;
+ BLOCK_INPUT;
if (NILP (isLoad))
{
ret = [panel runModalForDirectory: dirS file: initS];
@@ -1494,11 +1495,13 @@
ret = (ret == NSOKButton) || panelOK;
- fname = [panel filename];
+ if (ret)
+ fname = build_string ([[panel filename] UTF8String]);
[[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
+ UNBLOCK_INPUT;
- return ret ? build_string ([fname UTF8String]) : Qnil;
+ return ret ? fname : Qnil;
}
@@ -2644,6 +2647,7 @@
#endif
+
/* ==========================================================================
Lisp interface declaration
Index: nsmenu.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsmenu.m,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- nsmenu.m 7 Feb 2009 11:03:52 -0000 1.19
+++ nsmenu.m 13 Feb 2009 13:30:36 -0000 1.20
@@ -1494,12 +1494,15 @@
pop_down_menu (Lisp_Object arg)
{
struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
+ if (popup_activated_flag)
+ {
popup_activated_flag = 0;
BLOCK_INPUT;
[NSApp endModalSession: popupSession];
[((EmacsDialogPanel *) (p->pointer)) close];
[[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
UNBLOCK_INPUT;
+ }
return Qnil;
}
@@ -1565,12 +1568,8 @@
record_unwind_protect (pop_down_menu, make_save_value (dialog, 0));
popup_activated_flag = 1;
tem = [dialog runDialogAt: p];
- popup_activated_flag = 0;
- unbind_to (specpdl_count, Qnil);
+ unbind_to (specpdl_count, Qnil); /* calls pop_down_menu */
}
-
- [dialog close];
- [[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
UNBLOCK_INPUT;
return tem;
@@ -1879,6 +1878,7 @@
{
int ret;
+ /* initiate a session that will be ended by pop_down_menu */
popupSession = [NSApp beginModalSessionForWindow: self];
while (popup_activated_flag
&& (ret = [NSApp runModalSession: popupSession])
@@ -1889,7 +1889,6 @@
timer_check (1);
[NSThread sleepUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]];
}
- [NSApp endModalSession: popupSession];
{ /* FIXME: BIG UGLY HACK!!! */
Lisp_Object tmp;
Index: nsfont.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsfont.m,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- nsfont.m 8 Jan 2009 03:15:51 -0000 1.17
+++ nsfont.m 13 Feb 2009 13:30:36 -0000 1.18
@@ -1235,6 +1235,12 @@
font_info->name, family,
SDATA (SYMBOL_NAME (scripts[i])));
+ /* TODO: Some of the "scripts" in script-representative-chars are
+ actually only "sub-scripts" which are not fully defined. For
+ these, calling set_fontset_font generates an abort. Try to
+ guess which ones these are and avoid it. */
+ if (strstr (SDATA (SYMBOL_NAME (scripts[i])), "mathematical-")
+ != SDATA (SYMBOL_NAME (scripts[i])))
Fset_fontset_font (name, scripts[i], famAndReg, Qnil, Qnil);
free (family);
}
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7357
retrieving revision 1.7358
diff -u -b -r1.7357 -r1.7358
--- ChangeLog 13 Feb 2009 08:50:57 -0000 1.7357
+++ ChangeLog 13 Feb 2009 13:30:37 -0000 1.7358
@@ -1,3 +1,14 @@
+2009-02-13 Adrian Robert <address@hidden>
+
+ * nsfns.m (ns-read-file-name): BLOCK_INPUT while showing dialog.
+
+ * nsmenu.m (pop_down_menu): Check popup_activated_flag.
+ (ns_popup_dialog, EmacsDialogPanel-runDialogAt:): Let
+ pop_down_menu do the cleanup work as it is always called. (Bug#2154)
+
+ * nsfont.m (nsfont_make_fontset_for_font): For now, don't try to
+ set fontset font for "mathematical-" sub-scripts. (Bug #2218)
+
2009-02-12 Stefan Monnier <address@hidden>
* keyboard.c (adjust_point_for_property): Allow stopping betwen two
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src nsfns.m nsmenu.m nsfont.m ChangeLog,
Adrian Robert <=