Permalink
Browse files

Fixing exception thrown in end-of-line logic when user is at the begi…

…nning of a buffer and char-before returns nil
  • Loading branch information...
1 parent 244d4b3 commit 6c5eb29e352c2c55adcc00d6fad90396b55d9242 Keith Simmons committed Jan 25, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 coffee-mode.el
View
@@ -636,9 +636,10 @@ line? Returns `t' or `nil'. See the README for more details."
(end-of-line)
;; Optimized for speed - checks only the last character.
- (when (some (lambda (char)
- (= (char-before) char))
- coffee-indenters-eol)
+ (when (and (char-before)
+ (some (lambda (char)
+ (= (char-before) char))
+ coffee-indenters-eol))
(setd indenter-at-eol t)))
;; If we found an indenter, return `t'.

0 comments on commit 6c5eb29

Please sign in to comment.