Skip to content

Commit

Permalink
Font-lock docstrings as comments rather than strings. Thanks, Jeff Valk!
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Oct 14, 2009
1 parent d39c0aa commit bf8c632
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ if that value is non-nil."
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
(set (make-local-variable 'lisp-indent-function)
'clojure-indent-function)
(set (make-local-variable 'lisp-doc-string-elt-property)
'clojure-doc-string-elt)
(set (make-local-variable 'font-lock-multiline) t)

(setq lisp-imenu-generic-expression
Expand Down Expand Up @@ -331,6 +333,12 @@ elements of a def* forms."
("\\<io\\!\\>" 0 font-lock-warning-face)))
"Default expressions to highlight in Clojure mode.")

;; Docstring positions
(put 'defn 'clojure-doc-string-elt 2)
(put 'defn- 'clojure-doc-string-elt 2)
(put 'defmulti 'clojure-doc-string-elt 2)
(put 'defmacro 'clojure-doc-string-elt 2)

(defun clojure-indent-function (indent-point state)
"This function is the normal value of the variable `lisp-indent-function'.
It is used when indenting a line within a function call, to see if the
Expand Down

0 comments on commit bf8c632

Please sign in to comment.