   logModes: ->
     if Mode.debug
       @log "active modes (top to bottom):"
-      @log " ", mode.id for mode in Mode.modes[..].reverse()
+      for mode in Mode.modes[..].reverse()
+        @log " ", mode.id
     return
 
   log: (args...) ->
-    console.log args... if Mode.debug
+    if Mode.debug
+      console.log args...
     return
 
   # For tests only.

      @push
        _name: "mode-#{@id}/exitOnEscape"
        "keydown": (event) =>
          return @continueBubbling unless KeyboardUtils.isEscape event
          @exit event, event.target
          @suppressEvent


    if @options.suppressAllKeyboardEvents
      # TODO(philc): Make a let statement.
      downHanlder = @options["keydown"]
      @options["keydown"] = (event) => @alwaysSuppressPropagation =>
        if downHanlder
          downHanlder(event)
      pressHandler = @options["keypress"]
      @options["keypress"] = (event) => @alwaysSuppressPropagation =>
        if pressHandler
          pressHandler(event)

    @push
      keydown: @options.keydown || null
