emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100079: Fix return value of dnd-g


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100079: Fix return value of dnd-get-local-file-name (Bug#7090).
Date: Sat, 02 Oct 2010 21:27:39 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100079
author: Leo <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Sat 2010-10-02 21:27:39 -0400
message:
  Fix return value of dnd-get-local-file-name (Bug#7090).
  
  * lisp/dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only
  return non-nil if the file exists (Bug#7090).
modified:
  lisp/ChangeLog
  lisp/dnd.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-30 23:05:26 +0000
+++ b/lisp/ChangeLog    2010-10-03 01:27:39 +0000
@@ -1,3 +1,8 @@
+2010-10-03  Leo  <address@hidden>
+
+       * dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only
+       return non-nil if the file exists (Bug#7090).
+
 2010-09-30  Stefan Monnier  <address@hidden>
 
        * minibuffer.el (completion--replace):

=== modified file 'lisp/dnd.el'
--- a/lisp/dnd.el       2010-06-22 07:10:16 +0000
+++ b/lisp/dnd.el       2010-10-03 01:27:39 +0000
@@ -154,10 +154,11 @@
       (let* ((decoded-f (decode-coding-string
                         f
                         (or file-name-coding-system
-                            default-file-name-coding-system)))
-            (try-f (if (file-readable-p decoded-f) decoded-f f)))
-       (when (file-readable-p try-f) try-f)))))
-
+                            default-file-name-coding-system))))
+       (setq f (cond ((file-readable-p decoded-f) decoded-f)
+                     ((file-readable-p f) f)
+                     (t nil)))))
+    f))
 
 (defun dnd-open-local-file (uri action)
   "Open a local file.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]