* ido.el (ido-read-file-name): Guard against non-symbol value.
authorLeo Liu <sdl.web@gmail.com>
Sat, 13 Jul 2013 04:44:19 +0000 (12:44 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sat, 13 Jul 2013 04:44:19 +0000 (12:44 +0800)
lisp/ChangeLog
lisp/ido.el

index 1213e50..533ea0a 100644 (file)
@@ -1,3 +1,7 @@
+2013-07-13  Leo Liu  <sdl.web@gmail.com>
+
+       * ido.el (ido-read-file-name): Guard against non-symbol value.
+
 2013-07-13  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * progmodes/python.el (python-imenu--build-tree): Fix corner case
index ce43e86..6948e7a 100644 (file)
@@ -4760,16 +4760,20 @@ See `read-file-name' for additional parameters."
   (let (filename)
     (cond
      ((or (eq predicate 'file-directory-p)
-         (eq (get this-command 'ido) 'dir)
+         (eq (and (symbolp this-command)
+                  (get this-command 'ido)) 'dir)
          (memq this-command ido-read-file-name-as-directory-commands))
       (setq filename
            (ido-read-directory-name prompt dir default-filename mustmatch initial)))
-     ((and (not (eq (get this-command 'ido) 'ignore))
+     ((and (not (eq (and (symbolp this-command)
+                        (get this-command 'ido)) 'ignore))
           (not (memq this-command ido-read-file-name-non-ido))
           (or (null predicate) (eq predicate 'file-exists-p)))
       (let* (ido-saved-vc-hb
             (ido-context-switch-command
-             (if (eq (get this-command 'ido) 'find-file) nil 'ignore))
+             (if (eq (and (symbolp this-command)
+                          (get this-command 'ido)) 'find-file)
+                 nil 'ignore))
             (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
             (minibuffer-completing-file-name t)
             (ido-current-directory (ido-expand-directory dir))