I was calling intern() every time anyone called
select_convert_[in|out]. This patch makes XEmacs use a
variable to hold the symbols "select-convert-in" and
"select-convert-out".
Regards,
Alastair.
src/ChangeLog:
2000-07-17 Alastair J. Houghton <ajhoughton(a)lineone.net>
* select.c (select_convert_in, select_convert_out):
Don't call intern() every time.
* select.c (Qselect_convert_in, Qselect_convert_out): New.
* select.c (vars_of_select): Initialise them.
--- ../orig/xemacs-21.2/src/select.c Sun Jul 16 12:32:58 2000
+++ xemacs-21.2/src/select.c Mon Jul 17 17:10:41 2000
@@ -52,6 +52,9 @@
/* "Selection owner couldn't convert selection" */
Lisp_Object Qselection_conversion_error;
+/* A couple of Lisp functions */
+Lisp_Object Qselect_convert_in, Qselect_convert_out;
+
/* These are alists whose CARs are selection-types (whose names are the
same
as the names of X Atoms or Windows clipboard formats) and whose CDRs are
the names of Lisp functions to call to convert the given Emacs selection
@@ -543,7 +546,7 @@
Lisp_Object type,
Lisp_Object value)
{
- return call3 (intern ("select-convert-in"),
+ return call3 (Qselect_convert_in,
selection, type, value);
}
@@ -558,10 +561,9 @@
if (NILP (value))
return Qnil;
- return call3 (intern ("select-convert-out"),
+ return call3 (Qselect_convert_out,
selection, type, value);
}
-
/* Gets called from kill-buffer; this lets us dispose of buffer-dependent
selections (or alternatively make them independent of the buffer) when
@@ -657,6 +659,10 @@
DEFSUBR (Favailable_selection_types);
DEFSUBR (Fregister_selection_data_type);
DEFSUBR (Fselection_data_type_name);
+
+ /* Lisp Functions */
+ defsymbol (&Qselect_convert_in, "select-convert-in");
+ defsymbol (&Qselect_convert_out, "select-convert-out");
/* X Atoms */
defsymbol (&QPRIMARY, "PRIMARY");
--
____________________________________________________________
Alastair Houghton ajhoughton(a)lineone.net