]> code.delx.au - gnu-emacs/blobdiff - lisp/dnd.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / dnd.el
index f8cdf9a123935471cbb692e9a9fdab9e9fdb97b1..972354f39083324e6540de7cec9fda940fe46b31 100644 (file)
@@ -1,6 +1,6 @@
 ;;; dnd.el --- drag and drop support.
 
-;; Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
 ;; Maintainer: FSF
@@ -91,7 +91,7 @@ The handler is first located by looking at `dnd-protocol-alist'.
 If no match is found here, and the value of `browse-url-browser-function'
 is a pair of (REGEXP . FUNCTION), those regexps are tried for a match.
 If no match is found, just call `dnd-insert-text'.
-WINDOW is where the drop happend, ACTION is the action for the drop,
+WINDOW is where the drop happened, ACTION is the action for the drop,
 URL is what has been dropped.
 Returns ACTION."
   (require 'browse-url)
@@ -148,7 +148,9 @@ Return nil if URI is not a local file."
       (setq f (replace-regexp-in-string
               "%[A-Z0-9][A-Z0-9]"
               (lambda (arg)
-                (format "%c" (string-to-number (substring arg 1) 16)))
+                (let ((str (make-string 1 0)))
+                  (aset str 0 (string-to-number (substring arg 1) 16))
+                  str))
               f nil t))
       (let* ((decoded-f (decode-coding-string
                         f