Skip to content

Commit

Permalink
Don't allow overrides to be defined for "nil"
Browse files Browse the repository at this point in the history
I don't know if anything weird would happen if someone did that, but nil
should never be a valid function.
  • Loading branch information
DarwinAwardWinner committed Sep 5, 2013
1 parent a82878d commit da28383
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ido-ubiquitous.el
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ future sessions."
"Returns t if SPEC matches SYMBOL (which should be a function name).
See `ido-ubiquitous-command-overrides'."
(when (symbolp symbol)
(when (and symbol (symbolp symbol))
(destructuring-bind (type text) spec
(let ((matcher (cdr (assoc type ido-ubiquitous-spec-matchers)))
(text (ido-ubiquitous--as-string text))
Expand All @@ -583,7 +583,7 @@ See `ido-ubiquitous-command-overrides'."
If there is no override set for CMD in
`ido-ubiquitous-command-overrides', return nil."
(when (symbolp cmd)
(when (and cmd (symbolp cmd))
(loop for (action . spec) in ido-ubiquitous-command-overrides
when (memq action '(disable enable enable-old nil))
when (ido-ubiquitous-spec-match spec cmd)
Expand Down

0 comments on commit da28383

Please sign in to comment.