Skip to content

Commit 8ae3c39

Browse files
committed
[Fix #269] Check for bobp in `clojure-in-docstring-p'
* clojure-mode.el (clojure-in-docstring-p): Don't call `(get-text-property 0)`, since it will throw.
1 parent 181ee7d commit 8ae3c39

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## master (unreleased)
44

5+
### Bugs fixed
6+
7+
* Prevent error when calling `indent-for-tab-command` at the start of
8+
the buffer at end of line.
9+
510
## 4.0.1 (19/12/2014)
611

712
### Bugs fixed

clojure-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,9 @@ ENDP and DELIMITER."
280280

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

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

0 commit comments

Comments
 (0)