From 58fbe886f57da9b450fc6f1d1f5b2fee9c1fa0fc Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 13 Jul 2013 12:44:19 +0800 Subject: [PATCH] * ido.el (ido-read-file-name): Guard against non-symbol value. --- lisp/ChangeLog | 4 ++++ lisp/ido.el | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1213e509692..533ea0a0f23 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-07-13 Leo Liu + + * ido.el (ido-read-file-name): Guard against non-symbol value. + 2013-07-13 Fabián Ezequiel Gallina * progmodes/python.el (python-imenu--build-tree): Fix corner case 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)) -- 2.39.2