diff options
author | Leo Liu <sdl.web@gmail.com> | 2013-07-13 12:44:19 +0800 |
---|---|---|
committer | Leo Liu <sdl.web@gmail.com> | 2013-07-13 12:44:19 +0800 |
commit | 58fbe886f57da9b450fc6f1d1f5b2fee9c1fa0fc (patch) | |
tree | 3b6cc3d02bed1ae8ddc2e12dab6011bd5925e07e /lisp/ido.el | |
parent | 1f0480d4cdea9a266d73f184c56dc94915f1c67a (diff) | |
download | emacs-58fbe886f57da9b450fc6f1d1f5b2fee9c1fa0fc.tar.gz emacs-58fbe886f57da9b450fc6f1d1f5b2fee9c1fa0fc.tar.bz2 emacs-58fbe886f57da9b450fc6f1d1f5b2fee9c1fa0fc.zip |
* ido.el (ido-read-file-name): Guard against non-symbol value.
Diffstat (limited to 'lisp/ido.el')
-rw-r--r-- | lisp/ido.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index ce43e866d09..6948e7ad033 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -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)) |