Skip to content

Commit 1d179f2

Browse files
committed
[Fix #295] clojure-in-docstring-p not using point
The problem in #295 is caused by us checking the text property of the character penultimate character in the current line. When point is at the beginning of the buffer we're asking for the property at position 0, which doesn't exist. The solution is to not worry about what the text property is for the penultimate character of the current line and instead of check what it is at the position of point. This has the benefit of aligning the function result, name and docstring :)
1 parent 31ea7ce commit 1d179f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clojure-mode.el

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,7 @@ ENDP and DELIMITER."
275275

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

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

0 commit comments

Comments
 (0)