Show
Ignore:
Timestamp:
05/27/06 10:35:24 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/dnd.el

    r4037 r4091  
    7070;; Functions 
    7171 
    72 (defun dnd-handle-one-url (window action arg
     72(defun dnd-handle-one-url (window action url
    7373  "Handle one dropped url by calling the appropriate handler. 
    7474The handler is first located by looking at `dnd-protocol-alist'. 
     
    7777If no match is found, just call `dnd-insert-text'. 
    7878WINDOW is where the drop happend, ACTION is the action for the drop, 
    79 ARG is the URL that has been dropped. 
     79URL is what has been dropped. 
    8080Returns ACTION." 
    8181  (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) 
    8883    (or 
    8984     (catch 'done 
    9085       (dolist (bf dnd-protocol-alist) 
    91          (when (string-match (car bf) uri
    92            (setq ret (funcall (cdr bf) uri action)) 
     86         (when (string-match (car bf) url
     87           (setq ret (funcall (cdr bf) url action)) 
    9388           (throw 'done t))) 
    9489       nil) 
     
    9691       (catch 'done 
    9792         (dolist (bf browse-url-browser-function) 
    98            (when (string-match (car bf) uri
     93           (when (string-match (car bf) url
    9994             (setq ret 'private) 
    100              (funcall (cdr bf) uri action) 
     95             (funcall (cdr bf) url action) 
    10196             (throw 'done t))) 
    10297         nil)) 
    10398     (progn 
    104        (dnd-insert-text window action uri
     99       (dnd-insert-text window action url
    105100       (setq ret 'private))) 
    106101    ret)) 
     
    135130                  (substring uri (match-end 0)))))) 
    136131    (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)) 
    137137      (let* ((decoded-f (decode-coding-string 
    138138                         f