# HG changeset patch # User Jan Dj¸«£rv # Date 1082378728 0 # Node ID 82f3f56ffbf1c03d8e133fb38f8f484c5ec93f74 # Parent b1572d70d407e011c82517908759d8ac061e5402 * x-dnd.el (x-dnd-open-local-file, x-dnd-open-file): Improved error messages. diff -r b1572d70d407 -r 82f3f56ffbf1 lisp/ChangeLog --- a/lisp/ChangeLog Mon Apr 19 11:42:38 2004 +0000 +++ b/lisp/ChangeLog Mon Apr 19 12:45:28 2004 +0000 @@ -1,3 +1,8 @@ +2004-04-19 Jan Dj,Ad(Brv + + * x-dnd.el (x-dnd-open-local-file, x-dnd-open-file): Improved error + messages. + 2004-04-19 Stephen Eglen * add-log.el (add-change-log-entry): Update doc string to mention diff -r b1572d70d407 -r 82f3f56ffbf1 lisp/x-dnd.el --- a/lisp/x-dnd.el Mon Apr 19 11:42:38 2004 +0000 +++ b/lisp/x-dnd.el Mon Apr 19 12:45:28 2004 +0000 @@ -308,14 +308,13 @@ The last / in file:/// is part of the file name. ACTION is ignored." (let* ((f (x-dnd-get-local-file-name uri t))) - (when f - (if (file-readable-p f) - (progn - (if x-dnd-open-file-other-window - (find-file-other-window f) - (find-file f)) - 'private) - (error "Can not read %s (%s)" f uri))))) + (if (and f (file-readable-p f)) + (progn + (if x-dnd-open-file-other-window + (find-file-other-window f) + (find-file f)) + 'private) + (error "Can not read %s" uri)))) (defun x-dnd-open-file (uri action) "Open a local or remote file. @@ -327,7 +326,8 @@ ;; The hostname may be our hostname, in that case, convert to a local ;; file. Otherwise return nil. (let ((local-file (x-dnd-get-local-file-uri uri))) - (when local-file (x-dnd-open-local-file local-file action)))) + (if local-file (x-dnd-open-local-file local-file action) + (error "Remote files not supported")))) (defun x-dnd-handle-moz-url (window action data)