Lines Matching defs:start

43 (defconst casl-indent-start-keywords-re 
141 (defun casl-indent-skip-blanks-and-newlines-backward (start)
143 (skip-chars-backward " \t\n" start)
149 (defun casl-indent-start-of-def ()
150 "Returns the position of the start of a definition.
154 (let (start-code
157 (setq start-code 1)
161 (> (point) start-code)
167 (while (and (casl-indent-in-comment start-code (point))
173 (defun casl-indent-open-structure (start end)
177 (let ((pps (parse-partial-sexp start end)))
182 (defun casl-indent-in-comment (start end)
184 the location of the start of the comment, nil otherwise."
185 (cond ((> start end) end)
186 ((= start end) nil)
198 (t (let ((pps (parse-partial-sexp start end)))
233 (defun casl-indent-contour-line (start end)
235 (if (< start end)
241 (casl-indent-skip-blanks-and-newlines-backward start)
242 (while (and (> cur-col 0) (= fl 0) (>= (point) start))
264 (defun casl-indent-separate-valdef (start end)
272 (goto-char start)
274 (if (or (eq type 'ident) (eq type 'other)) ; possible start of a value def
291 (if (and (< (point) end) (eq type 'rhs)) ; start of a rhs
301 (if (and (< (point) end) (eq type 'guard)) ; start of a guard
311 (defun casl-indent-guard (start end end-visible indent-info)
314 (let* ((sep (casl-indent-separate-valdef start end))
328 (defun casl-indent-rhs (start end end-visible indent-info)
331 (let* ((sep (casl-indent-separate-valdef start end))
345 (defun casl-indent-comment (start end indent-info)
348 -- comments are aligned on their start
353 (let ((comment-start (casl-indent-in-comment start end)))
354 (if comment-start
355 (if (eq (following-char comment-start) ?%)
357 (casl-indent-push-pos comment-start)
359 (goto-char (+ 2 comment-start))
390 (defun casl-indent-empty (start end end-visible indent-info)
394 ((sep (casl-indent-separate-valdef start end))
412 (if (and valname-string ; special case for start keywords
413 (string-match casl-indent-start-keywords-re valname-string))
455 (defun casl-indent-ident (start end end-visible indent-info)
459 ((sep (casl-indent-separate-valdef start end))
476 (if (and valname-string ; special case for start keywords
477 (string-match casl-indent-start-keywords-re valname-string))
481 casl-indent-start-keywords-re
515 (defun casl-indent-other (start end end-visible indent-info)
520 ((sep (casl-indent-separate-valdef start end))
539 (if (and valname-string ; special case for start keywords
540 (string-match casl-indent-start-keywords-re valname-string))
564 (defun casl-indent-valdef-indentation (start end end-visible curr-line-type
567 (if (< start end-visible)
569 ('empty (casl-indent-empty start end end-visible indent-info))
570 ('ident (casl-indent-ident start end end-visible indent-info))
571 ('guard (casl-indent-guard start end end-visible indent-info))
572 ('rhs (casl-indent-rhs start end end-visible indent-info))
574 ('other (casl-indent-other start end end-visible indent-info)))
577 (defun casl-indent-line-indentation (line-start line-end end-visible
582 (let (end-match beg-match start-comment)
583 ;; point is (already) at line-start
584 (setq start-comment (casl-indent-in-comment line-start line-end))
585 (if start-comment ; if comment at the end
586 (setq line-end (- start-comment 1))) ; end line before it
591 (if (casl-indent-in-comment line-start (point)) ; keyword in a {- comment
595 line-start ; end line before comment
596 (- (search-backward "%\{" line-start) 1)
600 (setq line-start (point)))
602 (if (< line-start beg-match) ; if off-side-keyword at the start
604 (casl-indent-valdef-indentation line-start beg-match
607 ;; but keep the start of the line if keyword alone on the line
610 (setq line-start end-match)
611 (goto-char line-start)))
613 (casl-indent-valdef-indentation line-start line-end end-visible
620 (let ((start (casl-indent-start-of-def))
624 (if (setq open (casl-indent-open-structure start end))
637 (if (casl-indent-in-comment start end)
644 (setq contour-line (casl-indent-contour-line start end))
647 line-start line-end end-visible)
654 ;; if the first ident is where or the start of a def
661 (setq line-start (pop contour-line))
662 (goto-char line-start)
671 (if (and (not (casl-indent-open-structure start line-start))
672 (not (casl-indent-in-comment start line-start)))
674 (casl-indent-line-indentation line-start line-end
678 ;; simple contour just one indentation at start
679 (casl-indent-push-pos start)))
727 Elements of the stack are pairs of points giving the start and end