[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/x-dnd.el
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/x-dnd.el |
Date: |
Sat, 20 May 2006 04:29:18 +0000 |
Index: emacs/lisp/x-dnd.el
diff -u emacs/lisp/x-dnd.el:1.19 emacs/lisp/x-dnd.el:1.20
--- emacs/lisp/x-dnd.el:1.19 Mon Feb 6 14:33:35 2006
+++ emacs/lisp/x-dnd.el Sat May 20 04:29:18 2006
@@ -256,14 +256,20 @@
retval))
(defun x-dnd-handle-file-name (window action string)
- "Prepend file:// to file names and call `dnd-handle-one-url'.
+ "Convert file names to URLs and call `dnd-handle-one-url'.
WINDOW is the window where the drop happened.
STRING is the file names as a string, separated by nulls."
(let ((uri-list (split-string string "[\0\r\n]" t))
+ (coding (and default-enable-multibyte-characters
+ (or file-name-coding-system
+ default-file-name-coding-system)))
retval)
(dolist (bf uri-list)
;; If one URL is handeled, treat as if the whole drop succeeded.
- (let* ((file-uri (concat "file://" bf))
+ (if coding (setq bf (encode-coding-string bf coding)))
+ (let* ((file-uri (concat "file://"
+ (mapconcat 'url-hexify-string
+ (split-string bf "/") "/")))
(did-action (dnd-handle-one-url window action file-uri)))
(when did-action (setq retval did-action))))
retval))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/x-dnd.el,
YAMAMOTO Mitsuharu <=