* test-dist.el (test-elmo-modules-trailing-whitespace)
[elisp/wanderlust.git] / wl / wl-dnd.el
index 5578a7a..cf159f1 100644 (file)
@@ -1,10 +1,9 @@
-;;; wl-dnd.el -- dragdrop support on Wanderlust.
+;;; wl-dnd.el --- dragdrop support on Wanderlust.
 
-;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
+;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
 
 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
 ;; Keywords: mail, net news
-;; Time-stamp: <2000-02-18 19:14:53 teranisi>
 
 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
 
 ;;
 
 ;;; Commentary:
-;; 
+;;
 
 ;;; Code:
-;; 
-
-(provide 'wl-dnd)
+;;
+(eval-when-compile (require 'static))
 
 (static-cond
  ((featurep 'offix)
@@ -41,7 +39,7 @@
  ((featurep 'cde)
   (defun start-drag (event what &optional typ)
     (if (not typ)
-       (funcall (intern "cde-start-drag-internal") event nil 
+       (funcall (intern "cde-start-drag-internal") event nil
                 (list what))
       (funcall (intern "cde-start-drag-internal") event t what))))
  (t (defun start-drag (event what &optional typ))))
@@ -49,9 +47,9 @@
 (defun wl-dnd-start-drag (event)
   (interactive "@e")
   (mouse-set-point event)
-  (start-drag event (concat 
+  (start-drag event (concat
                     wl-summary-buffer-folder-name " "
-                    (int-to-string (wl-summary-message-number)))))
+                    (number-to-string (wl-summary-message-number)))))
 
 (defun wl-dnd-drop-func (event object text)
   (interactive "@e")
                       (split-string (nth 2 (car (cdr object)))
                                     " ")))
           (src-fld (nth 0 src-spec))
-          (number  (string-to-int (nth 1 src-spec)))
+          (number  (string-to-number (nth 1 src-spec)))
           target)
       (setq target
-           (wl-folder-get-folder-name-by-id (get-text-property 
+           (wl-folder-get-folder-name-by-id (get-text-property
                                              (point)
                                              'wl-folder-entity-id)))
       (message "%s is dropped at %s." number
@@ -74,7 +72,7 @@
       (set-buffer (wl-summary-get-buffer src-fld))
       (save-match-data
        (wl-summary-jump-to-msg number))
-      (wl-summary-refile target number)
+      (funcall (symbol-function 'wl-summary-refile) number target)
       (select-window (get-buffer-window (current-buffer)))
       ))
   t)
 (defun wl-dnd-set-drop-target (beg end)
   (let (ext substr)
     (setq ext (make-extent beg end))
-    (set-extent-property 
+    (set-extent-property
      ext
      'experimental-dragdrop-drop-functions
      '((wl-dnd-drop-func t t (buffer-substring beg end))))))
-;    (set-extent-property ext 'mouse-face 'highlight)))
+;;; (set-extent-property ext 'mouse-face 'highlight)
 
 (defun wl-dnd-set-drag-starter (beg end)
   (let (ext kmap)
     (setq ext (make-extent beg end))
-;    (set-extent-property ext 'mouse-face 'isearch)
+;;;    (set-extent-property ext 'mouse-face 'isearch)
     (setq kmap (make-keymap))
     (define-key kmap [button1] 'wl-dnd-start-drag)
     (set-extent-property ext 'keymap kmap)))
-                                            
+
+(require 'product)
+(product-provide (provide 'wl-dnd) (require 'wl-version))
+
 ;;; wl-dnd.el ends here