@@ -258,7 +258,7 @@ ENDP and DELIMITER."
258258 (= orig-point (match-end 0 )))))))))
259259
260260(defun clojure-paredit-setup ()
261- " A bit code to make ` paredit-mode' play nice with `clojure-mode' ."
261+ " Make \" paredit-mode\" play nice with `clojure-mode' ."
262262 (when (>= paredit-version 21 )
263263 (define-key clojure-mode-map " {" 'paredit-open-curly )
264264 (define-key clojure-mode-map " }" 'paredit-close-curly )
@@ -310,7 +310,9 @@ This only takes care of filling docstring correctly."
310310 (clojure-docstring-fill-prefix)))
311311
312312(defun clojure-fill-paragraph (&optional justify )
313- " Like `fill-paragraph' but handle Clojure docstrings."
313+ " Like `fill-paragraph' , but can handle Clojure docstrings.
314+
315+ If JUSTIFY is non-nil, justify as well as fill the paragraph."
314316 (if (clojure-in-docstring-p)
315317 (let ((paragraph-start
316318 (concat paragraph-start
@@ -362,7 +364,7 @@ This only takes care of filling docstring correctly."
362364
363365
364366(defun clojure-match-next-def ()
365- " Scans the buffer backwards for the next top-level definition.
367+ " Scans the buffer backwards for the next \" top-level\" definition.
366368Called by `imenu--generic-function' ."
367369 (when (re-search-backward " ^(def\\ sw*" nil t )
368370 (save-excursion
@@ -508,6 +510,12 @@ Called by `imenu--generic-function'."
508510 " Default expressions to highlight in Clojure mode." )
509511
510512(defun clojure-font-lock-syntactic-face-function (state )
513+ " Find and highlight text with a Clojure-friendly syntax table.
514+
515+ This function is passed to `font-lock-syntactic-face-function' ,
516+ which is called with a single parameter, STATE (which is, in
517+ turn, returned by `parse-partial-sexp' at the beginning of the
518+ highlighted region)."
511519 (if (nth 3 state)
512520 ; ; This might be a (doc)string or a |...| symbol.
513521 (let ((startpos (nth 8 state)))
@@ -657,17 +665,15 @@ point) to check."
657665 (lisp-indent-line )))
658666
659667(defun clojure-indent-function (indent-point state )
660- " This function is the normal value of the variable `lisp-indent-function' .
661- It is used when indenting a line within a function call, to see if the
662- called function says anything special about how to indent the line.
668+ " When indenting a line within a function call, indent properly.
663669
664670INDENT-POINT is the position where the user typed TAB, or equivalent.
665671Point is located at the point to indent under (for default indentation);
666672STATE is the `parse-partial-sexp' state for that position.
667673
668- If the current line is in a call to a Lisp function
669- which has a non-nil property `lisp -indent-function' ,
670- that specifies how to do the indentation.
674+ If the current line is in a call to a Clojure function with a
675+ non-nil property `clojure -indent-function' , that specifies how to do
676+ the indentation.
671677
672678The property value can be
673679
@@ -735,7 +741,8 @@ This function also returns nil meaning don't specify the indentation."
735741(defun clojure-backtracking-indent (indent-point state normal-indent )
736742 " Experimental backtracking support.
737743
738- Will upwards in an sexp to check for contextual indenting."
744+ Given an INDENT-POINT, the STATE, and the NORMAL-INDENT, will
745+ move upwards in an sexp to check for contextual indenting."
739746 (let (indent (path) (depth 0 ))
740747 (goto-char (elt state 1 ))
741748 (while (and (not indent)
@@ -792,15 +799,20 @@ Will upwards in an sexp to check for contextual indenting."
792799(put 'specify! 'clojure-backtracking-indent '(4 (2 )))
793800
794801(defun put-clojure-indent (sym indent )
802+ " Instruct `clojure-indent-function' to indent the body of SYM by INDENT."
795803 (put sym 'clojure-indent-function indent))
796804
797805(defmacro define-clojure-indent (&rest kvs )
806+ " Call `put-clojure-indent' on a series, KVS."
798807 `(progn
799808 ,@(mapcar (lambda (x ) `(put-clojure-indent
800809 (quote ,(first x)) ,(second x)))
801810 kvs)))
802811
803812(defun add-custom-clojure-indents (name value )
813+ " Allow `clojure-defun-indents' to indent user-specified macros.
814+
815+ Requires the macro's NAME and a VALUE."
804816 (custom-set-default name value)
805817 (mapcar (lambda (x )
806818 (put-clojure-indent x 'defun ))
0 commit comments