X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/bb4303c536a2ac5fe683a711ef8072074f77670e..05d76dba6604f78e4b2b7b9f8b30c916cad7d32a:/lisp/ido.el diff --git a/lisp/ido.el b/lisp/ido.el index a254b4fefc..0e74cbc7a2 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1,6 +1,6 @@ ;;; ido.el --- interactively do things with buffers and files -;; Copyright (C) 1996-2015 Free Software Foundation, Inc. +;; Copyright (C) 1996-2016 Free Software Foundation, Inc. ;; Author: Kim F. Storm ;; Based on: iswitchb by Stephen Eglen @@ -3491,14 +3491,12 @@ This is to make them appear as if they were \"virtual buffers\"." ;; the file which the user might thought was still open. (unless recentf-mode (recentf-mode 1)) (setq ido-virtual-buffers nil) - (let ((bookmarks (and (boundp 'bookmark-alist) - bookmark-alist)) - name) + (let (name) (dolist (head (append recentf-list - (delq nil (mapcar (lambda (bookmark) - (cdr (assoc 'filename bookmark))) - bookmarks)))) + (and (fboundp 'bookmark-get-filename) + (delq nil (mapcar #'bookmark-get-filename + (bound-and-true-p bookmark-alist)))))) (setq name (file-name-nondirectory head)) ;; In case HEAD is a directory with trailing /. See bug#14552. (when (equal name "") @@ -3559,7 +3557,9 @@ it is put to the start of the list." (let* ((len (1- (length dir))) (non-essential t) (compl - (or (file-name-all-completions "" dir) + (or ;; We do not want to be disturbed by "File does not + ;; exist" errors. + (ignore-errors (file-name-all-completions "" dir)) ;; work around bug in ange-ftp. ;; /ftp:user@host: => nil ;; /ftp:user@host:./ => ok