Mercurial > hg > xemacs-beta
comparison src/select.c @ 563:183866b06e0b
[xemacs-hg @ 2001-05-24 07:50:48 by ben]
Makefile.in.in, abbrev.c, alloc.c, buffer.c, bytecode.c, callint.c, callproc.c, casetab.c, chartab.c, cmdloop.c, cmds.c, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console.c, data.c, database.c, debug.c, device-gtk.c, device-msw.c, device-tty.c, device-x.c, device.c, dialog-gtk.c, dialog-msw.c, dialog-x.c, dialog.c, dired-msw.c, dired.c, doc.c, doprnt.c, dragdrop.c, editfns.c, eldap.c, eldap.h, elhash.c, emacs-widget-accessors.c, emacs.c, emodules.c, esd.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, filelock.c, floatfns.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, general-slots.h, glade.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-gtk.c, gui-x.c, gui.c, gutter.c, hpplay.c, indent.c, input-method-xlib.c, insdel.c, intl.c, keymap.c, libsst.c, libsst.h, linuxplay.c, lisp.h, lread.c, lstream.c, lstream.h, macros.c, marker.c, md5.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, miscplay.c, miscplay.h, mule-ccl.c, mule-charset.c, mule-wnnfns.c, mule.c, nas.c, ntplay.c, ntproc.c, objects-gtk.c, objects-msw.c, objects-x.c, objects.c, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay.c, scrollbar.c, search.c, select-gtk.c, select-x.c, select.c, sgiplay.c, sheap.c, sound.c, specifier.c, sunplay.c, symbols.c, symeval.h, symsinit.h, syntax.c, sysdep.c, toolbar-msw.c, toolbar.c, tooltalk.c, ui-byhand.c, ui-gtk.c, undo.c, unexaix.c, unexapollo.c, unexconvex.c, unexec.c, widget.c, win32.c, window.c:
-- defsymbol -> DEFSYMBOL.
-- add an error type to all errors.
-- eliminate the error functions in eval.c that let you just
use Qerror as the type.
-- redo the error API to be more consistent, sensibly named,
and easier to use.
-- redo the error hierarchy somewhat. create new errors:
structure-formation-error, gui-error, invalid-constant,
stack-overflow, out-of-memory, process-error, network-error,
sound-error, printing-unreadable-object, base64-conversion-
error; coding-system-error renamed to text-conversion error;
some others.
-- fix Mule problems in error strings in emodules.c, tooltalk.c.
-- fix error handling in mswin open-network-stream.
-- Mule-ize all sound files and clean up the headers.
-- nativesound.h -> sound.h and used for all sound files.
-- move some shared stuff into glyphs-shared.c: first attempt
at eliminating some of the massive GTK code duplication.
xemacs.mak: add glyphs-shared.c.
xemacs-faq.texi: document how to debug X errors
subr.el: fix doc string to reflect reality
author | ben |
---|---|
date | Thu, 24 May 2001 07:51:33 +0000 |
parents | c33ae14dd6d0 |
children | 42a86787d173 |
comparison
equal
deleted
inserted
replaced
562:c775bd016b32 | 563:183866b06e0b |
---|---|
152 Lisp_Object prev_real_value = Qnil; | 152 Lisp_Object prev_real_value = Qnil; |
153 struct gcpro gcpro1; | 153 struct gcpro gcpro1; |
154 int owned_p = 0; | 154 int owned_p = 0; |
155 | 155 |
156 CHECK_SYMBOL (selection_name); | 156 CHECK_SYMBOL (selection_name); |
157 if (NILP (selection_value)) error ("selection-value may not be nil."); | 157 if (NILP (selection_value)) |
158 invalid_argument ("`selection-value' may not be nil", Qunbound); | |
158 | 159 |
159 if (NILP (device)) | 160 if (NILP (device)) |
160 device = Fselected_device (Qnil); | 161 device = Fselected_device (Qnil); |
161 | 162 |
162 if (!EQ (how_to_add, Qappend) && !EQ (how_to_add, Qt) | 163 if (!EQ (how_to_add, Qappend) && !EQ (how_to_add, Qt) |
163 && !EQ (how_to_add, Qreplace_existing) | 164 && !EQ (how_to_add, Qreplace_existing) |
164 && !EQ (how_to_add, Qreplace_all) && !NILP (how_to_add)) | 165 && !EQ (how_to_add, Qreplace_all) && !NILP (how_to_add)) |
165 error ("how-to-add must be nil, append, replace_all, " | 166 invalid_constant ("`how-to-add' must be nil, append, replace_all, " |
166 "replace_existing or t."); | 167 "replace_existing or t", how_to_add); |
167 | 168 |
168 #ifdef MULE | 169 #ifdef MULE |
169 if (NILP (data_type)) | 170 if (NILP (data_type)) |
170 data_type = QCOMPOUND_TEXT; | 171 data_type = QCOMPOUND_TEXT; |
171 #else | 172 #else |
224 { | 225 { |
225 Lisp_Object function = assq_no_quit (data_type, | 226 Lisp_Object function = assq_no_quit (data_type, |
226 Vselection_appender_alist); | 227 Vselection_appender_alist); |
227 | 228 |
228 if (NILP (function)) | 229 if (NILP (function)) |
229 error ("cannot append selections of supplied types."); | 230 signal_error (Qinvalid_argument, |
231 "Cannot append selections of supplied types (no function)", | |
232 data_type); | |
230 | 233 |
231 function = XCDR (function); | 234 function = XCDR (function); |
232 | 235 |
233 selection_value = call4 (function, | 236 selection_value = call4 (function, |
234 selection_name, | 237 selection_name, |
235 data_type, | 238 data_type, |
236 XCDR (prev_real_value), | 239 XCDR (prev_real_value), |
237 selection_value); | 240 selection_value); |
238 | 241 |
239 if (NILP (selection_value)) | 242 if (NILP (selection_value)) |
240 error ("cannot append selections of supplied types."); | 243 signal_error (Qinvalid_argument, |
244 "Cannot append selections of supplied types (function returned nil)", | |
245 data_type); | |
241 } | 246 } |
242 else | 247 else |
243 error ("cannot append selections of supplied types."); | 248 signal_error_2 (Qinvalid_argument, "Cannot append selections of supplied types (data type nil and both values not strings)", |
249 XCDR (prev_real_value), | |
250 selection_value); | |
244 } | 251 } |
245 | 252 |
246 selection_data = Fcons (data_type, selection_value); | 253 selection_data = Fcons (data_type, selection_value); |
247 value_list = Fcons (selection_data, value_list); | 254 value_list = Fcons (selection_data, value_list); |
248 } | 255 } |
741 DEFSUBR (Favailable_selection_types); | 748 DEFSUBR (Favailable_selection_types); |
742 DEFSUBR (Fregister_selection_data_type); | 749 DEFSUBR (Fregister_selection_data_type); |
743 DEFSUBR (Fselection_data_type_name); | 750 DEFSUBR (Fselection_data_type_name); |
744 | 751 |
745 /* Lisp Functions */ | 752 /* Lisp Functions */ |
746 defsymbol (&Qselect_convert_in, "select-convert-in"); | 753 DEFSYMBOL (Qselect_convert_in); |
747 defsymbol (&Qselect_convert_out, "select-convert-out"); | 754 DEFSYMBOL (Qselect_convert_out); |
748 defsymbol (&Qselect_coerce, "select-coerce"); | 755 DEFSYMBOL (Qselect_coerce); |
749 | 756 |
750 /* X Atoms */ | 757 /* X Atoms */ |
751 defsymbol (&QPRIMARY, "PRIMARY"); | 758 DEFSYMBOL (QPRIMARY); |
752 defsymbol (&QSECONDARY, "SECONDARY"); | 759 DEFSYMBOL (QSECONDARY); |
753 defsymbol (&QSTRING, "STRING"); | 760 DEFSYMBOL (QSTRING); |
754 defsymbol (&QINTEGER, "INTEGER"); | 761 DEFSYMBOL (QINTEGER); |
755 defsymbol (&QCLIPBOARD, "CLIPBOARD"); | 762 DEFSYMBOL (QCLIPBOARD); |
756 defsymbol (&QTIMESTAMP, "TIMESTAMP"); | 763 DEFSYMBOL (QTIMESTAMP); |
757 defsymbol (&QTEXT, "TEXT"); | 764 DEFSYMBOL (QTEXT); |
758 defsymbol (&QDELETE, "DELETE"); | 765 DEFSYMBOL (QDELETE); |
759 defsymbol (&QMULTIPLE, "MULTIPLE"); | 766 DEFSYMBOL (QMULTIPLE); |
760 defsymbol (&QINCR, "INCR"); | 767 DEFSYMBOL (QINCR); |
761 defsymbol (&QEMACS_TMP, "_EMACS_TMP_"); | 768 defsymbol (&QEMACS_TMP, "_EMACS_TMP_"); |
762 defsymbol (&QTARGETS, "TARGETS"); | 769 DEFSYMBOL (QTARGETS); |
763 defsymbol (&QATOM, "ATOM"); | 770 DEFSYMBOL (QATOM); |
764 defsymbol (&QATOM_PAIR, "ATOM_PAIR"); | 771 defsymbol (&QATOM_PAIR, "ATOM_PAIR"); |
765 defsymbol (&QCOMPOUND_TEXT, "COMPOUND_TEXT"); | 772 defsymbol (&QCOMPOUND_TEXT, "COMPOUND_TEXT"); |
766 defsymbol (&QNULL, "NULL"); | 773 DEFSYMBOL (QNULL); |
767 | 774 |
768 /* Windows formats - these all start with CF_ */ | 775 /* Windows formats - these all start with CF_ */ |
769 defsymbol (&QCF_TEXT, "CF_TEXT"); | 776 defsymbol (&QCF_TEXT, "CF_TEXT"); |
770 defsymbol (&QCF_BITMAP, "CF_BITMAP"); | 777 defsymbol (&QCF_BITMAP, "CF_BITMAP"); |
771 defsymbol (&QCF_METAFILEPICT, "CF_METAFILEPICT"); | 778 defsymbol (&QCF_METAFILEPICT, "CF_METAFILEPICT"); |
788 defsymbol (&QCF_DSPBITMAP, "CF_DSPBITMAP"); | 795 defsymbol (&QCF_DSPBITMAP, "CF_DSPBITMAP"); |
789 defsymbol (&QCF_DSPMETAFILEPICT, "CF_DSPMETAFILEPICT"); | 796 defsymbol (&QCF_DSPMETAFILEPICT, "CF_DSPMETAFILEPICT"); |
790 defsymbol (&QCF_DSPENHMETAFILE, "CF_DSPENHMETAFILE"); | 797 defsymbol (&QCF_DSPENHMETAFILE, "CF_DSPENHMETAFILE"); |
791 | 798 |
792 /* Selection strategies */ | 799 /* Selection strategies */ |
793 defsymbol (&Qreplace_all, "replace-all"); | 800 DEFSYMBOL (Qreplace_all); |
794 defsymbol (&Qreplace_existing, "replace-existing"); | 801 DEFSYMBOL (Qreplace_existing); |
795 | 802 |
796 DEFERROR_STANDARD (Qselection_conversion_error, Qio_error); | 803 DEFERROR_STANDARD (Qselection_conversion_error, Qconversion_error); |
797 } | 804 } |
798 | 805 |
799 void | 806 void |
800 vars_of_select (void) | 807 vars_of_select (void) |
801 { | 808 { |