   (self-insert-command 1)
   (let (needs-indent state (parse-sexp-ignore-comments t))
     (setq state (parse-partial-sexp (point-min) (point)))
-    (unless (nth 3 state)		;unless in string or comment
+    (unless (nth 3 state)        ;unless in string or comment
       (save-excursion
-	(skip-chars-backward slate-name-chars)
-	(when (and (looking-at slate-name-regexp)
-		   (not (slate-at-method-begin)))
-	  (setq needs-indent (slate-white-to-bolp))))
+    (skip-chars-backward slate-name-chars)
+    (when (and (looking-at slate-name-regexp)
+           (not (slate-at-method-begin)))
+      (setq needs-indent (slate-white-to-bolp))))
       (when needs-indent
-	(slate-indent-for-colon)))))
+    (slate-indent-for-colon)))))
 
 (defun slate-indent-for-colon ()
   "Called only for lines which look like `<whitespace>foo:'."
   (let (indent-amount c state done default-amount start-line
-		      (parse-sexp-ignore-comments t))
+              (parse-sexp-ignore-comments t))
     (save-excursion
       (save-restriction
-	(widen)
-	(slate-narrow-to-method)
-	(beginning-of-line)
-	(setq state (parse-partial-sexp (point-min) (point)))
-	(narrow-to-region (point-min) (point))
-	(setq start-line (point))
-	(slate-backward-whitespace)
-	(cond
-	 ((bobp)
-	  (setq indent-amount (slate-current-column)))
-	 ((or (eq (setq c (preceding-char)) ?\|)
-	      (eq c ?\[))		; method header before
-	  (skip-chars-backward "^\[")
-	  (setq indent-amount slate-indent-increment))
-	 ((eq c ?.)	; stmt end, indent like it
-	  (slate-find-statement-begin)
-	  (setq indent-amount (slate-current-column)))
-	 (t				;could be a winner
-	  (slate-find-statement-begin)
-	  ;; we know that since we weren't at bobp above after backing
-	  ;; up over white space, and we didn't run into a ., we aren't
-	  ;; at the beginning of a statement, so the default indentation
-	  ;; is one level from statement begin
-	  (setq default-amount
-		(+ (slate-current-column) ;just in case
-		   slate-indent-increment))
-	  ;; might be at the beginning of a method (the selector), decide
-	  ;; this here
-	  (unless (looking-at slate-keyword-regexp)
-	    ;; not a method selector
-	    (while (and (not done) (not (eobp)))
-	      (slate-forward-sexp 1) ;skip over receiver
-	      (slate-forward-whitespace)
-	      (unless (and indent-amount ;pick up only first one
-			   (not (looking-at slate-keyword-regexp)))
-		(setq indent-amount (slate-current-column)))))
-	  (unless indent-amount
-	    (setq indent-amount default-amount))))))
+    (widen)
+    (slate-narrow-to-method)
+    (beginning-of-line)
+    (setq state (parse-partial-sexp (point-min) (point)))
+    (narrow-to-region (point-min) (point))
+    (setq start-line (point))
+    (slate-backward-whitespace)
+    (cond
+     ((bobp)
+      (setq indent-amount (slate-current-column)))
+     ((or (eq (setq c (preceding-char)) ?\|)
+          (eq c ?\[))        ; method header before
+      (skip-chars-backward "^\[")
+      (setq indent-amount slate-indent-increment))
+     ((eq c ?.)    ; stmt end, indent like it
+      (slate-find-statement-begin)
+      (setq indent-amount (slate-current-column)))
+     (t                ;could be a winner
+      (slate-find-statement-begin)
+      ;; we know that since we weren't at bobp above after backing
+      ;; up over white space, and we didn't run into a ., we aren't
+      ;; at the beginning of a statement, so the default indentation
+      ;; is one level from statement begin
+      (setq default-amount
+        (+ (slate-current-column) ;just in case
+           slate-indent-increment))
+      ;; might be at the beginning of a method (the selector), decide
+      ;; this here
+      (unless (looking-at slate-keyword-regexp)
+        ;; not a method selector
+        (while (and (not done) (not (eobp)))
+          (slate-forward-sexp 1) ;skip over receiver
+          (slate-forward-whitespace)
+          (unless (and indent-amount ;pick up only first one
+               (not (looking-at slate-keyword-regexp)))
+        (setq indent-amount (slate-current-column)))))
+      (unless indent-amount
+        (setq indent-amount default-amount))))))
     (when indent-amount
       (slate-indent-to-column indent-amount))))
 

a list. Note that the first argument must be found by searching backwards."
  (save-excursion
    (let (start selector done ch arg-names
		(parse-sexp-ignore-comments t))
      (skip-chars-backward (concat "^" "\"" slate-whitespace-chars))
      (setq start (point))
      (if (looking-at slate-name-regexp)
	  (progn			;maybe unary, maybe keyword
	    (skip-chars-forward slate-name-chars)
	    (if (equal (following-char) ?:)	;keyword?
		(progn
		  (forward-char 1)
		  (setq selector (buffer-substring start (point)))
		  (setq start (point))
		  (while (not done)
		    (slate-forward-whitespace)
		    (setq ch (following-char))
		    (cond ((memq ch '(?@ ?\] ?\) ?.))
			   (setq done t))
			  ((equal ch ?:)
			   (forward-char 1)
			   (setq selector
				 (concat selector
					 (buffer-substring start (point)))))
			  (t
			   (setq start (point))
			   (slate-forward-sexp 1)))))
	      (setq selector (buffer-substring start (point)))))
	(skip-chars-forward (concat "^" ?\" slate-whitespace-chars))
	(setq selector (buffer-substring start (point))))
      selector)))

;; Imenu Support


(defconst slate-imenu-generic-expression
  `(("Slots" ,(format "^.*add[A-Za-z]*Slot: #\\(%s\\) valued: .* derive"
               slate-name-regexp) 1)
    ("Prototypes" ,(format "^.*addPrototype: #\\(%s\\) derivedFrom: {.*}\."
               slate-name-regexp) 1)
    ("Prototypes" ,(format "^.*define: #\\(%s\\) &parents: {.*}"
               slate-name-regexp) 1)
    ("Methods" "^\\([^\[]*@[^\[\"]*\\)$" 1) ; Matches the whole signature.
    ))

