diff lisp/x-dnd.el @ 59996:aac0a33f5772

Change release version from 21.4 to 22.1 throughout. Change development version from 21.3.50 to 22.0.50.
author Kim F. Storm <storm@cua.dk>
date Wed, 09 Feb 2005 15:50:47 +0000
parents c7c51386376c
children c7f99496c6bb 89ac10c67e45 3ebd9bdb4fe5
line wrap: on
line diff
--- a/lisp/x-dnd.el	Tue Feb 08 23:51:31 2005 +0000
+++ b/lisp/x-dnd.el	Wed Feb 09 15:50:47 2005 +0000
@@ -47,7 +47,7 @@
 the wanted action as car and the wanted type as cdr.  The wanted action
 can be copy, move, link, ask or private.
 The default value for this variable is `x-dnd-default-test-function'."
-  :version "21.4"
+  :version "22.1"
   :type 'symbol
   :group 'x)
 
@@ -70,7 +70,7 @@
 for that.
 The function shall return the action done (move, copy, link or private)
 if some action was made, or nil if the URL is ignored."
-  :version "21.4"
+  :version "22.1"
   :type 'alist
   :group 'x)
 
@@ -98,13 +98,13 @@
 call to `x-dnd-test-function'.  DATA is the drop data.
 The function shall return the action used (copy, move, link or private) if drop
 is successful, nil if not."
-  :version "21.4"
+  :version "22.1"
   :type 'alist
   :group 'x)
 
 (defcustom x-dnd-open-file-other-window nil
   "If non-nil, always use find-file-other-window to open dropped files."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'x)
 
@@ -124,7 +124,7 @@
     )
   "The types accepted by default for dropped data.
 The types are chosen in the order they appear in the list."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'x
 )
@@ -135,10 +135,10 @@
   "The current state for a drop.
 This is an alist with one entry for each display.  The value for each display
 is a vector that contains the state for drag and drop for that display.
-Elements in the vector are: 
+Elements in the vector are:
 Last buffer drag was in,
 last window drag was in,
-types available for drop, 
+types available for drop,
 the action suggested by the source,
 the type we want for the drop,
 the action we want for the drop,
@@ -209,7 +209,7 @@
 	       (handler (cdr (assoc (cdr action-type) x-dnd-types-alist))))
 	  ;; Ignore action-type if we have no handler.
 	  (setq current-state
-		(x-dnd-save-state window 
+		(x-dnd-save-state window
 				  action
 				  (when handler action-type)))))))
   (let ((current-state (x-dnd-get-state-for-frame window)))
@@ -300,13 +300,13 @@
 		 ((string-match "^file:" uri)		; Old KDE, Motif, Sun
 		  (substring uri (match-end 0))))))
     (when (and f must-exist)
-      (let* ((decoded-f (decode-coding-string 
+      (let* ((decoded-f (decode-coding-string
 			 f
 			 (or file-name-coding-system
 			     default-file-name-coding-system)))
 	     (try-f (if (file-readable-p decoded-f) decoded-f f)))
 	(when (file-readable-p try-f) try-f)))))
-	
+
 
 (defun x-dnd-open-local-file (uri action)
   "Open a local file.
@@ -590,7 +590,7 @@
 			(frame-parameter frame 'outer-window-id))
 		       accept ;; 1 = Accept, 0 = reject.
 		       (x-dnd-get-drop-x-y frame window)
-		       (x-dnd-get-drop-width-height 
+		       (x-dnd-get-drop-width-height
 			frame window (eq accept 1))
 		       (or reply-action 0)
 		       )))
@@ -612,9 +612,9 @@
 
 	   (setq action (if value
 			    (condition-case info
-				(x-dnd-drop-data event frame window value 
+				(x-dnd-drop-data event frame window value
 						 (x-dnd-current-type window))
-			      (error 
+			      (error
 			       (message "Error: %s" info)
 			       nil))))
 
@@ -738,7 +738,7 @@
 	  ((eq message-type 'XmDRAG_MOTION)
 	   (let* ((state (x-dnd-get-state-for-frame frame))
 		  (timestamp (x-dnd-motif-value-to-list
-			      (x-dnd-get-motif-value data 4 4 
+			      (x-dnd-get-motif-value data 4 4
 						     source-byteorder)
 			      4 my-byteorder))
 		  (x (x-dnd-motif-value-to-list
@@ -757,7 +757,7 @@
 		  (reply-flags
 		   (x-dnd-motif-value-to-list
 		    (if reply-action
-			(+ reply-action 
+			(+ reply-action
 			   ?\x30	; 30:  valid drop site
 			   ?\x700)	; 700: can do copy, move or link
 		      ?\x30)		; 30:  drop site, but noop.
@@ -794,7 +794,7 @@
 		  (reply-flags
 		   (x-dnd-motif-value-to-list
 		    (if reply-action
-			(+ reply-action 
+			(+ reply-action
 			   ?\x30	; 30:  valid drop site
 			   ?\x700)	; 700: can do copy, move or link
 		      ?\x30)		; 30:  drop site, but noop
@@ -833,7 +833,7 @@
 		  (reply-flags
 		   (x-dnd-motif-value-to-list
 		    (if reply-action
-			(+ reply-action 
+			(+ reply-action
 			   ?\x30	; 30:  valid drop site
 			   ?\x700)	; 700: can do copy, move or link
 		      (+ ?\x30		; 30:  drop site, but noop.
@@ -847,7 +847,7 @@
 			  reply-flags
 			  x
 			  y))
-		  (timestamp (x-dnd-get-motif-value 
+		  (timestamp (x-dnd-get-motif-value
 			      data 4 4 source-byteorder))
 		  action)
 
@@ -857,26 +857,26 @@
 				    "_MOTIF_DRAG_AND_DROP_MESSAGE"
 				    8
 				    reply)
-	     (setq action 
+	     (setq action
 		   (when (and reply-action atom-name)
 		     (let* ((value (x-get-selection-internal
 				    (intern atom-name)
 				    (intern (x-dnd-current-type window)))))
 		       (when value
 			 (condition-case info
-			     (x-dnd-drop-data event frame window value 
+			     (x-dnd-drop-data event frame window value
 					      (x-dnd-current-type window))
 			   (error
 			    (message "Error: %s" info)
 			    nil))))))
 	     (x-get-selection-internal
-	      (intern atom-name)	  
+	      (intern atom-name)
 	      (if action 'XmTRANSFER_SUCCESS 'XmTRANSFER_FAILURE)
 	      timestamp)
 	     (x-dnd-forget-drop frame)))
 
 	  (t (error "Unknown Motif DND message %s %s" message-atom data)))))
-					   
+
 
 ;;;