CVS update by aidan xemacs/src ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Sun Sep 30 17:40:14 EDT 2007
User: aidan
Date: 07/09/30 23:40:14
Branch: xemacs/src carbon2
Modified: xemacs/src ChangeLog.carbon2 intl-carbon.c console-carbon.c
Log:
Qtype -> Qunicode_type, add JIT key binding to carbon2
Revision Changes Path
1.1.2.2 +14 -0 XEmacs/xemacs/src/Attic/ChangeLog.carbon2
Index: ChangeLog.carbon2
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Attic/ChangeLog.carbon2,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.1 -r1.1.2.2
--- ChangeLog.carbon2 2007/09/30 21:14:35 1.1.2.1
+++ ChangeLog.carbon2 2007/09/30 21:40:12 1.1.2.2
@@ -1,5 +1,19 @@
2007-09-30 Aidan Kehoe <kehoea at parhasard.net>
+ * intl-carbon.c:
+ * intl-carbon.c (complex_vars_of_intl_carbon):
+ Use the Qunicode_type symbol, not the Qtype symbol, to tell the
+ Unicode coding system creation code what sort of coding system to
+ create.
+ * console-carbon.c:
+ * console-carbon.c (carbon_perhaps_init_unseen_key_defaults):
+ * console-carbon.c (console_type_create_carbon):
+ * console-carbon.c (vars_of_console_carbon):
+ Add the perhaps_init_unseen_key_defaults method to Carbon
+ consoles.
+
+2007-09-30 Aidan Kehoe <kehoea at parhasard.net>
+
* select-carbon.c (pasteboard_get_utext_or_text):
Merge Andrew Choi's change pasteboard-crash.diff
1.1.2.3 +5 -1 XEmacs/xemacs/src/Attic/intl-carbon.c
Index: intl-carbon.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Attic/intl-carbon.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.2 -r1.1.2.3
--- intl-carbon.c 2005/02/25 17:17:42 1.1.2.2
+++ intl-carbon.c 2007/09/30 21:40:13 1.1.2.3
@@ -32,5 +32,9 @@ syms_of_intl_carbon (void)
void
complex_vars_of_intl_carbon (void)
{
- Fmake_coding_system (Qcarbon_unicode, Qunicode, build_msg_string ("Carbon Unicode"), nconc2 (list4 (Qdocumentation, build_msg_string ( "Converts to the Unicode encoding for Carbon/Quartz 2D calls.\nThe encoding used is standard UTF-16 big-endian."), Qmnemonic, build_string ("CARBON-U")), list4 (Qtype, Qutf_16, Qlittle_endian, Qnil)));
+#ifdef WORDS_BIGENDIAN
+ Fmake_coding_system (Qcarbon_unicode, Qunicode, build_msg_string ("Carbon Unicode"), nconc2 (list4 (Qdocumentation, build_msg_string ( "Converts to the Unicode encoding for Carbon/Quartz 2D calls.\nThe encoding used is standard UTF-16 big-endian."), Qmnemonic, build_string ("CARBON-U")), list4 (Qunicode_type, Qutf_16, Qlittle_endian, Qnil)));
+#else
+ Fmake_coding_system (Qcarbon_unicode, Qunicode, build_msg_string ("Carbon Unicode"), nconc2 (list4 (Qdocumentation, build_msg_string ( "Converts to the Unicode encoding for Carbon/Quartz 2D calls.\nThe encoding used is standard UTF-16 big-endian."), Qmnemonic, build_string ("CARBON-U")), list4 (Qunicode_type, Qutf_16, Qlittle_endian, Qt)));
+#endif
}
1.1.2.3 +61 -0 XEmacs/xemacs/src/Attic/console-carbon.c
Index: console-carbon.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Attic/console-carbon.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.2 -r1.1.2.3
--- console-carbon.c 2005/02/25 17:17:41 1.1.2.2
+++ console-carbon.c 2007/09/30 21:40:13 1.1.2.3
@@ -22,11 +22,14 @@
#include "lisp.h"
#include "console-impl.h"
+#include "elhash.h"
/* All functions in this file are taken from console-qt.cpp*/
DEFINE_CONSOLE_TYPE (carbon);
+Lisp_Object Vcarbon_seen_characters;
+
static int
carbon_initially_selected_for_input (struct console * UNUSED (con))
{
@@ -80,6 +83,57 @@ carbon_canonicalize_device_connection (L
RETURN_UNGCPRO (connection);
}
+static Lisp_Object
+carbon_perhaps_init_unseen_key_defaults (struct console *con, Lisp_Object key)
+{
+ Ichar val;
+ extern Lisp_Object Vcurrent_global_map;
+
+ if (SYMBOLP(key))
+ {
+ /* We've no idea what to default a symbol to on MS Windows, and most
+ of the keys I'm aware of that have
+ symbols--cf. event-msw.c--_shouldn't_ have associated chars. */
+ return Qnil;
+ }
+
+ CHECK_CHAR(key);
+
+ if (!(HASH_TABLEP(Vcarbon_seen_characters)))
+ {
+ /* All the keysym we deal with are character objects; therefore, we
+ can use eq as the test without worrying. */
+ Vcarbon_seen_characters = make_lisp_hash_table (128,
+ HASH_TABLE_NON_WEAK,
+ HASH_TABLE_EQ);
+ }
+ /* Might give the user an opaque error if make_lisp_hash_table fails,
+ but it shouldn't crash. */
+ CHECK_HASH_TABLE(Vcarbon_seen_characters);
+
+ val = XCHAR(key);
+
+ /* Same logic as in x_has_keysym; I'm not convinced it's sane. */
+ if (val < 0x80)
+ {
+ return Qnil;
+ }
+
+ if (!NILP(Fgethash(key, Vcarbon_seen_characters, Qnil)))
+ {
+ return Qnil;
+ }
+
+ if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil)))
+ {
+ Fputhash(key, Qt, Vcarbon_seen_characters);
+ Fdefine_key (Vcurrent_global_map, key, Qself_insert_command);
+ return Qt;
+ }
+
+ return Qnil;
+}
+
void
syms_of_console_carbon (void)
{
@@ -96,6 +150,7 @@ console_type_create_carbon (void)
CONSOLE_HAS_METHOD (carbon, canonicalize_device_connection);
CONSOLE_HAS_METHOD (carbon, device_to_console_connection);
CONSOLE_HAS_METHOD (carbon, initially_selected_for_input);
+ CONSOLE_HAS_METHOD (carbon, perhaps_init_unseen_key_defaults);
}
void
@@ -107,5 +162,11 @@ reinit_console_type_create_carbon (void)
void
vars_of_console_carbon (void)
{
+
+ DEFVAR_LISP ("carbon-seen-characters", &Vcarbon_seen_characters /*
+Hash table of non-ASCII characters the Carbon subsystem has seen.
+*/ );
+ Vcarbon_seen_characters = Qnil;
+
Fprovide (Qcarbon);
}
More information about the XEmacs-CVS
mailing list