/* Selection processing for Emacs on Mac OS.
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
{
ScrapFlavorType flavor_type = 0;
- if (CONSP (XCAR (rest)) && SYMBOLP (target_type = XCAR (XCAR (rest)))
+ if (CONSP (XCAR (rest))
+ && (target_type = XCAR (XCAR (rest)),
+ SYMBOLP (target_type))
&& (flavor_type = scrap_has_target_type (scrap, target_type)))
{
result = Fcons (target_type, result);
for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest))
{
if (!(CONSP (XCAR (rest))
- && SYMBOLP (type = XCAR (XCAR (rest)))
+ && (type = XCAR (XCAR (rest)),
+ SYMBOLP (type))
&& valid_scrap_target_type_p (type)
- && SYMBOLP (handler_fn = XCDR (XCAR (rest)))))
+ && (handler_fn = XCDR (XCAR (rest)),
+ SYMBOLP (handler_fn))))
continue;
if (!NILP (handler_fn))
GlobalToLocal (&mouse_pos);
err = GetDragModifiers (drag, NULL, NULL, &modifiers);
}
+ if (err == noErr)
+ {
+ UInt32 key_modifiers = modifiers;
+
+ err = AEPutParamPtr (&apple_event, kEventParamKeyModifiers,
+ typeUInt32, &key_modifiers, sizeof (UInt32));
+ }
if (err == noErr)
{
- mac_store_drag_event (window, mouse_pos, modifiers, &apple_event);
+ mac_store_drag_event (window, mouse_pos, 0, &apple_event);
AEDisposeDesc (&apple_event);
mac_wakeup_from_rne ();
return noErr;
The function should return the value to send to the Scrap Manager
\(must be a string). A return value of nil
-means that the conversion could not be done.
-A return value which is the symbol `NULL'
-means that a side-effect was executed,
-and there is no meaningful selection value. */);
+means that the conversion could not be done. */);
Vselection_converter_alist = Qnil;
DEFVAR_LISP ("x-lost-selection-functions", &Vx_lost_selection_functions,