/[emacs]/emacs/lisp/x-dnd.el
ViewVC logotype

Diff of /emacs/lisp/x-dnd.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8.2.1 by handa, Fri Apr 16 12:50:11 2004 UTC revision 1.8.2.2 by miles, Mon Jun 28 07:28:48 2004 UTC
# Line 308  and must have the format file:file-name Line 308  and must have the format file:file-name
308  The last / in file:/// is part of the file name.  ACTION is ignored."  The last / in file:/// is part of the file name.  ACTION is ignored."
309    
310    (let* ((f (x-dnd-get-local-file-name uri t)))    (let* ((f (x-dnd-get-local-file-name uri t)))
311      (when f      (if (and f (file-readable-p f))
312        (if (file-readable-p f)          (progn
313            (progn            (if x-dnd-open-file-other-window
314              (if x-dnd-open-file-other-window                (find-file-other-window f)
315                  (find-file-other-window f)              (find-file f))
316                (find-file f))            'private)
317              'private)        (error "Can not read %s" uri))))
         (error "Can not read %s (%s)" f uri)))))  
318    
319  (defun x-dnd-open-file (uri action)  (defun x-dnd-open-file (uri action)
320    "Open a local or remote file.    "Open a local or remote file.
# Line 327  The last / in file://hostname/ is part o Line 326  The last / in file://hostname/ is part o
326    ;; The hostname may be our hostname, in that case, convert to a local    ;; The hostname may be our hostname, in that case, convert to a local
327    ;; file.  Otherwise return nil.    ;; file.  Otherwise return nil.
328    (let ((local-file (x-dnd-get-local-file-uri uri)))    (let ((local-file (x-dnd-get-local-file-uri uri)))
329      (when local-file (x-dnd-open-local-file local-file action))))      (if local-file (x-dnd-open-local-file local-file action)
330          (error "Remote files not supported"))))
331    
332    
333  (defun x-dnd-handle-moz-url (window action data)  (defun x-dnd-handle-moz-url (window action data)

Legend:
Removed from v.1.8.2.1  
changed lines
  Added in v.1.8.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26