view tests/Dnd/README @ 4719:bd51ab22afa8

Make it possible to silence warnings issued when #'mapcar's result is discarded. lisp/ChangeLog addition: 2009-10-19 Aidan Kehoe <kehoea@parhasard.net> * bytecomp.el (byte-compile-default-warnings): Add two new warning types, discarded-consing (basically use of mapcar instead of mapc where its result is discarded) and quoted-lambda (use of a lambda expression quoted as data in a function context). (byte-compile-warnings): Document the new warnings. (byte-compile-fset, byte-compile-funarg): Implement the quoted-lambda warning option. (byte-compile-mapcar): Renamed to byte-compile-maybe-mapc. (byte-compile-maybe-mapc, byte-compile-maplist): Implement the discarded-consing warning option. Add more functions that should be compiled using byte-compile-funarg, notably mapvector, mapc-internal, map-char-table. * cl-macs.el (mapcar*): If we know at compile time that there are no CL options being used, use the mapcar subr, not the byte-coded function.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 19 Oct 2009 12:47:21 +0100
parents 3ecd8885ac67
children bc4f2511bbea
line wrap: on
line source

 * Sun May 3 1998 Oliver Graf <ograf@fga.de>

This path contains test code for the new XEmacs
Drag'n'Drop code.

To test the code do the following:
1) call 'bash droptest.sh' to create the test files in /tmp
2) load and eval droptest.el in XEmacs
3) Try to do some internal DnD by using the sources and targets
   in the new buffer
4) Do some external DnD:
   4a) OffiX: use files and editor of OffiX
              drag something from files or editor into XEmacs
              drag something from XEmacs to xv (only with OffiX patch,
              editor or files -- files can only move and copy within
              itself, cause OffiX is not quite the right thing to do)
   4b) CDE: use dtfile and dtpad instead, but here everything should
            work.
   4c) MSWindows: well, explorer should do. But only file data
                  should work, and I don't know if the test
                  already handles this.

The misc-user-event now also responds as a button-x-event
to the event-* query functions.

The function of a drag is called dragdrop-drop-dispatch
as you can see in droptest.el. From within the function
you can access the actual misc-user-event through the
current-mouse-event variable.

Short description of the object part of a drop misc-user-event:
( TYPE . DATA )
TYPE is either the symbol dragdrop_MIME
     or the symbol dragdrop_URL

DATA is a list of URL strings if TYPE is dragdrop_URL
     if TYPE is dragdrop_MIME DATA is either a string
     which contains the MIME data, or it is a list of
     ( CONTENT-TYPE CONTENT-ENCODING MIME-DATA )
     CONTENT-TYPE is encoded for tm-view (list, first element type,
	rest key.value conses)
     CONTENT-ENCODING is a string
     MIME-DATA is a string

     CONTENT-TYPE and -ENCODING can be directly supplied to mime/viewer-mode.