mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
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).
This commit is contained in:
parent
7b2bf907f1
commit
83b8ea28ea
2 changed files with 10 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2010-10-03 Leo <sdl.web@gmail.com>
|
||||
|
||||
* 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 <monnier@iro.umontreal.ca>
|
||||
|
||||
* minibuffer.el (completion--replace):
|
||||
|
|
|
|||
|
|
@ -154,10 +154,11 @@ Return nil if URI is not a local file."
|
|||
(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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue