"Stephen J. Turnbull" wrote:
>>>>> "-BP" == William M Perry <wmperry(a)aventail.com>
writes:
-BP> "Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
>> (Stylistically, many of the symbols in your syms_of_* functions
>> probably belong in general-slots.h.)
-BP> Do you have a list? I wasn't sure when to use
-BP> general-slots.h. Anytime you need to `extern Lisp_Object
-BP> Qfoo;'?
Ask Ben if he has any ideas about guidelines, but I would say this
should follow the usual "no prefix means `general' namespace." Eg,
unless commented otherwise, all of the following look pretty generic
to me, so candidates for general-slots.h.
But it really is a matter of style. If you think it's unlikely to be
independently defsymbol'ed in another module, keep it in the module
it's relevant to. Your guess is better than mine. ;-)
yes, that is exactly the criterion.
void
syms_of_event_gtk (void)
{
defsymbol (&Qkey_mapping, "key-mapping"); /* OK, Emacs lispers will
keymap, not key-mapping */
defsymbol (&Qsans_modifiers, "sans-modifiers"); /* fonts might use this
*/
}
void
syms_of_gui_gtk (void)
{
#ifdef HAVE_POPUPS /* probably non-generic? */
defsymbol (&Qmenu_no_selection_hook, "menu-no-selection-hook");
#endif
}
void
syms_of_frame_gtk (void)
{
/* your plan is that this kind of stuff will be shared, right?
if it's abstracted into a separate .c file, put it there.
but if the interface is all in .h, these go to general-slots.h */
defsymbol (&Qwindow_id, "window-id");
defsymbol (&Qtext_widget, "text-widget");
defsymbol (&Qcontainer_widget, "container-widget");
defsymbol (&Qshell_widget, "shell-widget");
defsymbol (&Qdetachable_menubar, "detachable-menubar");
/* Non-defsymbols omitted */
}
void
syms_of_ui_gtk (void)
{
/* Non-defsymbols omitted */
defsymbol (&Qemacs_ffip, "emacs-ffi-p"); /* OK, these are gtk-specific
*/
defsymbol (&Qemacs_gtk_objectp, "emacs-gtk-object-p");
defsymbol (&Qemacs_gtk_boxedp, "emacs-gtk-boxed-p");
defsymbol (&Qvoid, "void"); /* ... no way! */
}
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."
--
ben
I'm sometimes slow in getting around to reading my mail, so if you
want to reach me faster, call 520-661-6661.
See
http://www.666.com/ben/chronic-pain/ for the hell I've been
through.