Skip to content

Commit

Permalink
[Fix #269] Check for bobp in `clojure-in-docstring-p'
Browse files Browse the repository at this point in the history
* clojure-mode.el (clojure-in-docstring-p): Don't call
`(get-text-property 0)`, since it will throw.
  • Loading branch information
abo-abo committed Jan 12, 2015
1 parent 181ee7d commit 8ae3c39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## master (unreleased)

### Bugs fixed

* Prevent error when calling `indent-for-tab-command` at the start of
the buffer at end of line.

## 4.0.1 (19/12/2014)

### Bugs fixed
Expand Down
5 changes: 3 additions & 2 deletions clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,9 @@ ENDP and DELIMITER."

(defsubst clojure-in-docstring-p ()
"Check whether point is in a docstring."
(eq (get-text-property (1- (point-at-eol)) 'face)
'font-lock-doc-face))
(unless (bobp)
(eq (get-text-property (1- (point-at-eol)) 'face)
'font-lock-doc-face)))

(defsubst clojure-docstring-fill-prefix ()
"The prefix string used by `clojure-fill-paragraph'.
Expand Down

0 comments on commit 8ae3c39

Please sign in to comment.