changeset: 5378:31be2a3d121d
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Dec 30 00:50:10 2010 +0000
files: src/ChangeLog src/abbrev.c src/chartab.c src/elhash.c src/general-slots.h
src/general.c src/lisp.h
description:
Move Qcount, Q_default, Q_test to general-slots.h; add SYMBOL_KEYWORD_GENERAL()
2010-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* elhash.c (syms_of_elhash):
* chartab.c (syms_of_chartab):
* abbrev.c (syms_of_abbrev):
* general-slots.h:
Move Qcount, Q_default, Q_test to general-slots.h, they're about
to be used by other files. Rename Q_default to Q_default_, for the
sake of the PARSE_KEYWORDS macro (given that default is a reserved
identifier in C). Add SYMBOL_KEYWORD_GENERAL(), analogous to
SYMBOL_GENERAL() to make this easier.
diff -r ed5d4f081fa9 -r 31be2a3d121d src/ChangeLog
--- a/src/ChangeLog Thu Dec 30 00:18:50 2010 +0000
+++ b/src/ChangeLog Thu Dec 30 00:50:10 2010 +0000
@@ -1,3 +1,15 @@
+2010-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * elhash.c (syms_of_elhash):
+ * chartab.c (syms_of_chartab):
+ * abbrev.c (syms_of_abbrev):
+ * general-slots.h:
+ Move Qcount, Q_default, Q_test to general-slots.h, they're about
+ to be used by other files. Rename Q_default to Q_default_, for the
+ sake of the PARSE_KEYWORDS macro (given that default is a reserved
+ identifier in C). Add SYMBOL_KEYWORD_GENERAL(), analogous to
+ SYMBOL_GENERAL() to make this easier.
+
2010-12-29 Aidan Kehoe <kehoea(a)parhasard.net>
* floatfns.c (Ffloat): If we've been handed a bigfloat here, it's
diff -r ed5d4f081fa9 -r 31be2a3d121d src/abbrev.c
--- a/src/abbrev.c Thu Dec 30 00:18:50 2010 +0000
+++ b/src/abbrev.c Thu Dec 30 00:50:10 2010 +0000
@@ -75,7 +75,7 @@
/* Hook to run before expanding any abbrev. */
Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook;
-Lisp_Object Qsystem_type, Qcount;
+Lisp_Object Qsystem_type;
struct abbrev_match_mapper_closure
{
@@ -558,9 +558,6 @@
void
syms_of_abbrev (void)
{
- DEFSYMBOL(Qcount);
- Qcount = intern ("count");
- staticpro (&Qcount);
DEFSYMBOL(Qsystem_type);
Qsystem_type = intern ("system-type");
DEFSYMBOL (Qpre_abbrev_expand_hook);
diff -r ed5d4f081fa9 -r 31be2a3d121d src/chartab.c
--- a/src/chartab.c Thu Dec 30 00:18:50 2010 +0000
+++ b/src/chartab.c Thu Dec 30 00:50:10 2010 +0000
@@ -42,7 +42,7 @@
#include "chartab.h"
#include "syntax.h"
-Lisp_Object Qchar_tablep, Qchar_table, Q_default;
+Lisp_Object Qchar_tablep, Qchar_table;
Lisp_Object Vall_syntax_tables;
@@ -1581,7 +1581,7 @@
{
type = value;
}
- else if (EQ (key, Q_default))
+ else if (EQ (key, Q_default_))
{
default_ = value;
}
@@ -1626,7 +1626,11 @@
check_valid_char_table_value (default_, XCHAR_TABLE_TYPE (chartab),
ERROR_ME);
set_char_table_default (chartab, default_);
- set_char_table_default (XCHAR_TABLE (chartab)->mirror_table, default_);
+ if (!NILP (XCHAR_TABLE (chartab)->mirror_table))
+ {
+ set_char_table_default (XCHAR_TABLE (chartab)->mirror_table,
+ default_);
+ }
}
while (!NILP (dataval))
@@ -1902,7 +1906,6 @@
DEFSYMBOL (Qchar_table);
DEFSYMBOL_MULTIWORD_PREDICATE (Qchar_tablep);
- DEFKEYWORD (Q_default);
DEFSUBR (Fchar_table_p);
DEFSUBR (Fchar_table_type_list);
@@ -1957,7 +1960,7 @@
define_structure_type_keyword (st, Q_type, chartab_type_validate);
define_structure_type_keyword (st, Q_data, chartab_data_validate);
- define_structure_type_keyword (st, Q_default, chartab_default_validate);
+ define_structure_type_keyword (st, Q_default_, chartab_default_validate);
}
void
diff -r ed5d4f081fa9 -r 31be2a3d121d src/elhash.c
--- a/src/elhash.c Thu Dec 30 00:18:50 2010 +0000
+++ b/src/elhash.c Thu Dec 30 00:50:10 2010 +0000
@@ -93,7 +93,7 @@
static Lisp_Object Qweakness, Qvalue, Qkey_or_value, Qkey_and_value;
static Lisp_Object Vall_weak_hash_tables;
static Lisp_Object Qrehash_size, Qrehash_threshold;
-static Lisp_Object Q_size, Q_test, Q_weakness, Q_rehash_size, Q_rehash_threshold;
+static Lisp_Object Q_size, Q_weakness, Q_rehash_size, Q_rehash_threshold;
static Lisp_Object Vhash_table_test_eq, Vhash_table_test_eql;
static Lisp_Object Vhash_table_test_weak_list;
@@ -2291,7 +2291,6 @@
DEFSYMBOL (Qnon_weak); /* obsolete */
DEFKEYWORD (Q_data);
- DEFKEYWORD (Q_test);
DEFKEYWORD (Q_size);
DEFKEYWORD (Q_rehash_size);
DEFKEYWORD (Q_rehash_threshold);
diff -r ed5d4f081fa9 -r 31be2a3d121d src/general-slots.h
--- a/src/general-slots.h Thu Dec 30 00:18:50 2010 +0000
+++ b/src/general-slots.h Thu Dec 30 00:50:10 2010 +0000
@@ -32,6 +32,8 @@
SYMBOL_KEYWORD (Q_foo); declares a keyword symbol ":foo"
SYMBOL_GENERAL (Qfoo, "bar"); declares a symbol named "bar" but
stored in
the variable Qfoo
+ SYMBOL_KEYWORD_GENERAL (Q_foo_, ":bar"); declares a keyword named
":bar"
+ but stored in the variable Q_foo_.
To sort the crap in this file, use the following:
@@ -92,6 +94,7 @@
SYMBOL (Qconsole);
SYMBOL (Qcontrol_1);
SYMBOL (Qcopies);
+SYMBOL (Qcount);
SYMBOL_MODULE_API (Qcritical);
SYMBOL (Qctext);
SYMBOL (Qcurrent);
@@ -102,6 +105,9 @@
SYMBOL (Qdead);
SYMBOL (Qdebug);
SYMBOL (Qdefault);
+/* We name the C variable corresponding to the keyword Q_default_, not
+ Q_default, to allow it to be useful with PARSE_KEYWORDS (). */
+SYMBOL_KEYWORD_GENERAL (Q_default_, ":default");
SYMBOL_MODULE_API (Qdelete);
SYMBOL (Qdelq);
SYMBOL (Qdescription);
@@ -270,6 +276,7 @@
SYMBOL_KEYWORD (Q_start);
SYMBOL (Qstream);
SYMBOL (Qstring);
+SYMBOL (Qstring_match);
SYMBOL_KEYWORD (Q_style);
SYMBOL_KEYWORD (Q_suffix);
SYMBOL (Qsubtype);
@@ -279,6 +286,7 @@
SYMBOL (Qsystem_default);
SYMBOL (Qterminal);
SYMBOL (Qtest);
+SYMBOL_KEYWORD (Q_test);
SYMBOL (Qtext);
SYMBOL_KEYWORD (Q_text);
SYMBOL (Qthis_command);
diff -r ed5d4f081fa9 -r 31be2a3d121d src/general.c
--- a/src/general.c Thu Dec 30 00:18:50 2010 +0000
+++ b/src/general.c Thu Dec 30 00:50:10 2010 +0000
@@ -29,8 +29,9 @@
#define SYMBOL(fou) Lisp_Object fou
#define SYMBOL_MODULE_API(fou) Lisp_Object fou
-#define SYMBOL_KEYWORD(la_cle_est_fou) Lisp_Object la_cle_est_fou
+#define SYMBOL_KEYWORD(la_cle_est_folle) Lisp_Object la_cle_est_folle
#define SYMBOL_GENERAL(tout_le_monde, est_fou) Lisp_Object tout_le_monde
+#define SYMBOL_KEYWORD_GENERAL(ponle, la_clave) Lisp_Object ponle
#include "general-slots.h"
@@ -38,6 +39,7 @@
#undef SYMBOL_MODULE_API
#undef SYMBOL_KEYWORD
#undef SYMBOL_GENERAL
+#undef SYMBOL_KEYWORD_GENERAL
void
syms_of_general (void)
@@ -46,10 +48,13 @@
#define SYMBOL_MODULE_API(loco) DEFSYMBOL (loco)
#define SYMBOL_KEYWORD(meshugeneh) DEFKEYWORD (meshugeneh)
#define SYMBOL_GENERAL(vachement, fou) defsymbol (&vachement, fou)
+#define SYMBOL_KEYWORD_GENERAL(bescheuert, gaaanz_bescheuert) \
+ defkeyword (&bescheuert, gaaanz_bescheuert)
#include "general-slots.h"
#undef SYMBOL
#undef SYMBOL_KEYWORD
#undef SYMBOL_GENERAL
+#undef SYMBOL_KEYWORD_GENERAL
}
diff -r ed5d4f081fa9 -r 31be2a3d121d src/lisp.h
--- a/src/lisp.h Thu Dec 30 00:18:50 2010 +0000
+++ b/src/lisp.h Thu Dec 30 00:50:10 2010 +0000
@@ -5305,9 +5305,11 @@
/* Defined in general.c */
#define SYMBOL(fou) extern Lisp_Object fou
#define SYMBOL_MODULE_API(fou) extern MODULE_API Lisp_Object fou
-#define SYMBOL_KEYWORD(la_cle_est_fou) extern Lisp_Object la_cle_est_fou
+#define SYMBOL_KEYWORD(la_cle_est_folle) extern Lisp_Object la_cle_est_folle
#define SYMBOL_GENERAL(tout_le_monde, est_fou) \
extern Lisp_Object tout_le_monde
+#define SYMBOL_KEYWORD_GENERAL(y_compris_ben, mais_que_peut_on_faire) \
+ extern Lisp_Object y_compris_ben
#include "general-slots.h"
@@ -5315,6 +5317,7 @@
#undef SYMBOL_MODULE_API
#undef SYMBOL_KEYWORD
#undef SYMBOL_GENERAL
+#undef SYMBOL_KEYWORD_GENERAL
extern Lisp_Object Qeq;
extern Lisp_Object Qeql;
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches