Skip to content

Commit

Permalink
Guard against that this-command not being a symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiegley committed Jun 17, 2012
1 parent 5b78853 commit e36a198
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ido-hacks.el
Expand Up @@ -48,7 +48,8 @@ argument is a function (which ido can't handle)."
(car collection)))
(symbolp collection)
inherit-input-method
(eq (get this-command 'ido) 'ignore))
(or (not (symbolp this-command))
(eq (get this-command 'ido) 'ignore)))

ad-do-it
;; copied from ido-completing-read
Expand All @@ -73,7 +74,8 @@ history, instead of the incomplete input."
;;(defun ido-read-internal (item prompt history &optional default require-match initial)
(let (history-add-new-input
(hook (intern (format "ido-make-%s-list-hook" item)))
(fix-default (get this-command 'ido-hacks-fix-default)))
(fix-default (and (symbolp this-command)
(get this-command 'ido-hacks-fix-default))))

(clrhash ido-hacks-flex-narrowed-matches-hash)
(if (or fix-default
Expand Down

0 comments on commit e36a198

Please sign in to comment.