Changeset 4091 for trunk/lisp/dnd.el
- Timestamp:
- 05/27/06 10:35:24 (2 years ago)
- Files:
-
- trunk/lisp/dnd.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/dnd.el
r4037 r4091 70 70 ;; Functions 71 71 72 (defun dnd-handle-one-url (window action arg)72 (defun dnd-handle-one-url (window action url) 73 73 "Handle one dropped url by calling the appropriate handler. 74 74 The handler is first located by looking at `dnd-protocol-alist'. … … 77 77 If no match is found, just call `dnd-insert-text'. 78 78 WINDOW is where the drop happend, ACTION is the action for the drop, 79 ARG is the URL that has been dropped.79 URL is what has been dropped. 80 80 Returns ACTION." 81 81 (require 'browse-url) 82 (let* ((uri (replace-regexp-in-string 83 "%[A-Z0-9][A-Z0-9]" 84 (lambda (arg) 85 (format "%c" (string-to-number (substring arg 1) 16))) 86 arg)) 87 ret) 82 (let (ret) 88 83 (or 89 84 (catch 'done 90 85 (dolist (bf dnd-protocol-alist) 91 (when (string-match (car bf) ur i)92 (setq ret (funcall (cdr bf) ur iaction))86 (when (string-match (car bf) url) 87 (setq ret (funcall (cdr bf) url action)) 93 88 (throw 'done t))) 94 89 nil) … … 96 91 (catch 'done 97 92 (dolist (bf browse-url-browser-function) 98 (when (string-match (car bf) ur i)93 (when (string-match (car bf) url) 99 94 (setq ret 'private) 100 (funcall (cdr bf) ur iaction)95 (funcall (cdr bf) url action) 101 96 (throw 'done t))) 102 97 nil)) 103 98 (progn 104 (dnd-insert-text window action ur i)99 (dnd-insert-text window action url) 105 100 (setq ret 'private))) 106 101 ret)) … … 135 130 (substring uri (match-end 0)))))) 136 131 (when (and f must-exist) 132 (setq f (replace-regexp-in-string 133 "%[A-Z0-9][A-Z0-9]" 134 (lambda (arg) 135 (format "%c" (string-to-number (substring arg 1) 16))) 136 f nil t)) 137 137 (let* ((decoded-f (decode-coding-string 138 138 f
