[mew-dist 26238] Drag and Drop

Kenichi Niioka ( 新岡賢一 ) niioka at example.com
2005年 4月 30日 (土) 00:03:52 JST


新岡です。

わたしの環境依存かもしれませんが、2005-04-11 の emacs cvs head の
変更で、Draft モードへファイルを DnD しても添付領域にファイルが添
付されなくなりました。
見ようみまねですが、以下のパッチで添付領域にファイルが添付できてい
ます。
2005-04-11 以前の cvs head のことは考えていません。

--
にいおか
-------------- next part --------------
Index: auxiliary.el
===================================================================
RCS file: /cvsmew/mew/auxiliary.el,v
retrieving revision 1.9
diff -u -r1.9 auxiliary.el
--- auxiliary.el	2 Mar 2005 10:00:33 -0000	1.9
+++ auxiliary.el	29 Apr 2005 14:48:48 -0000
@@ -27,7 +27,7 @@
 (defvar w32-start-process-show-window nil)
 (defvar w3m-content-type-alist nil)
 (defvar w3m-namazu-index-alist nil)
-(defvar x-dnd-protocol-alist nil)
+(defvar dnd-protocol-alist nil)
 (defvar x-dnd-test-function nil)
 
 (defun amultibyte-string-p (&rest args))
@@ -68,5 +68,5 @@
 (defun w3m-url-local-p (&rest args))
 (defun w3m-url-to-file-name (&rest args))
 (defun x-dnd-choose-type (&rest args))
-(defun x-dnd-get-local-file-name (&rest args))
-(defun x-dnd-get-local-file-uri (&rest args))
+(defun dnd-get-local-file-name (&rest args))
+(defun dnd-get-local-file-uri (&rest args))
Index: mew-attach.el
===================================================================
RCS file: /cvsmew/mew/mew-attach.el,v
retrieving revision 1.41
diff -u -r1.41 mew-attach.el
--- mew-attach.el	13 Jan 2005 08:07:13 -0000	1.41
+++ mew-attach.el	29 Apr 2005 14:48:49 -0000
@@ -746,7 +746,7 @@
       nil)))
 
 (defun mew-draft-dnd-handle-local-file (uri action)
-  (let* ((from (x-dnd-get-local-file-name uri t))
+  (let* ((from (dnd-get-local-file-name uri t))
 	 (to (file-name-nondirectory from)))
     (when from
       (unless (mew-attach-p)
@@ -767,7 +767,7 @@
 	(message "Nothing happened"))))))
 
 (defun mew-draft-dnd-handle-file (uri action)
-  (let ((local-file (x-dnd-get-local-file-uri uri)))
+  (let ((local-file (dnd-get-local-file-uri uri)))
     (if local-file (mew-draft-dnd-handle-local-file local-file action)
       nil)))
 
Index: mew-draft.el
===================================================================
RCS file: /cvsmew/mew/mew-draft.el,v
retrieving revision 1.122
diff -u -r1.122 mew-draft.el
--- mew-draft.el	4 Feb 2005 15:50:04 -0000	1.122
+++ mew-draft.el	29 Apr 2005 14:48:49 -0000
@@ -53,15 +53,15 @@
   (when mew-require-final-newline
     (make-local-variable 'require-final-newline)
     (setq require-final-newline t))
-  (when (featurep 'x-dnd)
+  (when (featurep 'dnd)
     (make-variable-buffer-local 'x-dnd-test-function)
-    (make-variable-buffer-local 'x-dnd-protocol-alist)
+    (make-variable-buffer-local 'dnd-protocol-alist)
     (setq x-dnd-test-function 'mew-draft-dnd-test-function)
-    (setq x-dnd-protocol-alist
+    (setq dnd-protocol-alist
 	  (append '(("^file:///" . mew-draft-dnd-handle-local-file)
 		    ("^file://"  . mew-draft-dnd-handle-file)
 		    ("^file:"    . mew-draft-dnd-handle-local-file))
-		  x-dnd-protocol-alist))))
+		  dnd-protocol-alist))))
 
 (defun mew-draft-mode (&optional encrypted)
   "\\<mew-draft-mode-map>


Mew-dist メーリングリストの案内