Skip to content

Commit e6d5224

Browse files
committed
Better detection of doc-strings
1 parent 5e7f581 commit e6d5224

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clojure-mode.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,13 @@ This could cause problems.
558558

559559
(defsubst clojure-in-docstring-p ()
560560
"Check whether point is in a docstring."
561-
(eq (get-text-property (point) 'face) 'font-lock-doc-face))
561+
(let ((ppss (syntax-ppss)))
562+
(when (nth 3 ppss)
563+
(eq (get-text-property (nth 8 ppss) 'face)
564+
'font-lock-doc-face))))
562565

563566
(defsubst clojure-docstring-fill-prefix ()
564567
"The prefix string used by `clojure-fill-paragraph'.
565-
566568
It is simply `clojure-docstring-fill-prefix-width' number of spaces."
567569
(make-string clojure-docstring-fill-prefix-width ? ))
568570

0 commit comments

Comments
 (0)