@@ -262,7 +262,7 @@ ENDP and DELIMITER."
262262 (= orig-point (match-end 0 )))))))))
263263
264264(defun clojure-paredit-setup ()
265- " A bit code to make ` paredit-mode' play nice with `clojure-mode' ."
265+ " Make \" paredit-mode\" play nice with `clojure-mode' ."
266266 (when (>= paredit-version 21 )
267267 (define-key clojure-mode-map " {" 'paredit-open-curly )
268268 (define-key clojure-mode-map " }" 'paredit-close-curly )
@@ -314,7 +314,9 @@ This only takes care of filling docstring correctly."
314314 (clojure-docstring-fill-prefix)))
315315
316316(defun clojure-fill-paragraph (&optional justify )
317- " Like `fill-paragraph' but handle Clojure docstrings."
317+ " Like `fill-paragraph' , but can handle Clojure docstrings.
318+
319+ If JUSTIFY is non-nil, justify as well as fill the paragraph."
318320 (if (clojure-in-docstring-p)
319321 (let ((paragraph-start
320322 (concat paragraph-start
@@ -366,7 +368,7 @@ This only takes care of filling docstring correctly."
366368
367369
368370(defun clojure-match-next-def ()
369- " Scans the buffer backwards for the next top-level definition.
371+ " Scans the buffer backwards for the next \" top-level\" definition.
370372Called by `imenu--generic-function' ."
371373 (when (re-search-backward " ^(def\\ sw*" nil t )
372374 (save-excursion
@@ -512,6 +514,12 @@ Called by `imenu--generic-function'."
512514 " Default expressions to highlight in Clojure mode." )
513515
514516(defun clojure-font-lock-syntactic-face-function (state )
517+ " Find and highlight text with a Clojure-friendly syntax table.
518+
519+ This function is passed to `font-lock-syntactic-face-function' ,
520+ which is called with a single parameter, STATE (which is, in
521+ turn, returned by `parse-partial-sexp' at the beginning of the
522+ highlighted region)."
515523 (if (nth 3 state)
516524 ; ; This might be a (doc)string or a |...| symbol.
517525 (let ((startpos (nth 8 state)))
@@ -661,17 +669,15 @@ point) to check."
661669 (lisp-indent-line )))
662670
663671(defun clojure-indent-function (indent-point state )
664- " This function is the normal value of the variable `lisp-indent-function' .
665- It is used when indenting a line within a function call, to see if the
666- called function says anything special about how to indent the line.
672+ " When indenting a line within a function call, indent properly.
667673
668674INDENT-POINT is the position where the user typed TAB, or equivalent.
669675Point is located at the point to indent under (for default indentation);
670676STATE is the `parse-partial-sexp' state for that position.
671677
672- If the current line is in a call to a Lisp function
673- which has a non-nil property `lisp -indent-function' ,
674- that specifies how to do the indentation.
678+ If the current line is in a call to a Clojure function with a
679+ non-nil property `clojure -indent-function' , that specifies how to do
680+ the indentation.
675681
676682The property value can be
677683
@@ -739,7 +745,8 @@ This function also returns nil meaning don't specify the indentation."
739745(defun clojure-backtracking-indent (indent-point state normal-indent )
740746 " Experimental backtracking support.
741747
742- Will upwards in an sexp to check for contextual indenting."
748+ Given an INDENT-POINT, the STATE, and the NORMAL-INDENT, will
749+ move upwards in an sexp to check for contextual indenting."
743750 (let (indent (path) (depth 0 ))
744751 (goto-char (elt state 1 ))
745752 (while (and (not indent)
@@ -796,15 +803,20 @@ Will upwards in an sexp to check for contextual indenting."
796803(put 'specify! 'clojure-backtracking-indent '(4 (2 )))
797804
798805(defun put-clojure-indent (sym indent )
806+ " Instruct `clojure-indent-function' to indent the body of SYM by INDENT."
799807 (put sym 'clojure-indent-function indent))
800808
801809(defmacro define-clojure-indent (&rest kvs )
810+ " Call `put-clojure-indent' on a series, KVS."
802811 `(progn
803812 ,@(mapcar (lambda (x ) `(put-clojure-indent
804813 (quote ,(first x)) ,(second x)))
805814 kvs)))
806815
807816(defun add-custom-clojure-indents (name value )
817+ " Allow `clojure-defun-indents' to indent user-specified macros.
818+
819+ Requires the macro's NAME and a VALUE."
808820 (custom-set-default name value)
809821 (mapcar (lambda (x )
810822 (put-clojure-indent x 'defun ))
0 commit comments