emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r113336: * ido.el (ido-add-virtual-buffers-to-list):


From: Leo Liu
Subject: [Emacs-diffs] trunk r113336: * ido.el (ido-add-virtual-buffers-to-list): Robustify. (Bug#14552)
Date: Tue, 09 Jul 2013 05:11:10 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113336
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14552
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Tue 2013-07-09 13:09:45 +0800
message:
  * ido.el (ido-add-virtual-buffers-to-list): Robustify.  (Bug#14552)
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/ido.el                    ido.el-20091113204419-o5vbwnq5f7feedwu-2430
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-09 02:47:44 +0000
+++ b/lisp/ChangeLog    2013-07-09 05:09:45 +0000
@@ -3,6 +3,7 @@
        * ido.el (ido-read-directory-name): Handle fallback.
        (ido-read-file-name): Update DIR to ido-current-directory.
        (Bug#1516)
+       (ido-add-virtual-buffers-to-list): Robustify.  (Bug#14552)
 
 2013-07-09  Dmitry Gutov  <address@hidden>
 

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2013-07-09 02:47:44 +0000
+++ b/lisp/ido.el       2013-07-09 05:09:45 +0000
@@ -3461,8 +3461,14 @@
   (setq ido-virtual-buffers nil)
   (let (name)
     (dolist (head recentf-list)
-      (and (setq name (file-name-nondirectory head))
-           (null (get-file-buffer head))
+      (setq name (file-name-nondirectory head))
+      ;; In case HEAD is a directory with trailing /.  See bug#14552.
+      (when (equal name "")
+       (setq name (file-name-nondirectory (directory-file-name head))))
+      (when (equal name "")
+       (setq name head))
+      (and (not (equal name ""))
+          (null (get-file-buffer head))
            (not (assoc name ido-virtual-buffers))
            (not (member name ido-temp-list))
            (not (ido-ignore-item-p name ido-ignore-buffers))


reply via email to

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