Lines Matching +defs:nest +defs:line

33 ;;                csh-mode looks at the first line and indents properly to line
100 reindent the current line. If nil, indent the current line only if
101 point is at the left margin or in the line's indentation; otherwise
131 "Regexp used to match non-one-line if statements")
144 "Regexp used to match a line with a statement using more lines.")
172 ;; Comments on line 1, which are missed by syntactic fontification.
193 ;; line to prevent re-fontifying text in comments. Due to this, we
242 ;;(define-key csh-mode-map "\t" 'csh-indent-line)
282 (defun csh-current-line ()
284 Top line is 1."
291 "Determine how much to indent this structure. Return a list (level line)
297 (nest-column (if (zerop match-point)
302 (nest-list (cons 0 0)) ;; sentinel cons since cdr is >= 1
310 (while (and (consp nest-list) (zerop (cdr nest-list))
316 (setq nest-list
321 (cond ((consp nest-list)
322 (if (zerop (cdr nest-list))
325 (cons nest-column (csh-current-line)))
326 nest-list))
334 (defun csh-get-nest-level ()
335 "Return a 2 element list (nest-level nest-line) describing where the
336 current line should nest."
340 (forward-line -1)
345 (forward-line -1)
346 (beginning-of-line)
350 (csh-current-line)))
351 (forward-line -1)
355 (cons (current-indentation) (csh-current-line))
361 (defun csh-get-nester-column (nest-line)
362 "Return the column to indent to with respect to nest-line taking
367 (start-line (csh-current-line)))
369 ;; Handle case item indentation constructs for this line
371 ;; This line is a case item...
373 (goto-line nest-line)
374 (let ((fence-post (save-excursion (end-of-line) (point))))
392 (t;; Not a case-item. What to do relative to the nest-line?
394 (goto-line nest-line)
395 (setq fence-post (save-excursion (end-of-line) (point)))
402 (goto-line (1- start-line))
470 "Indent current line relative to containing block and allow for
477 (csh-indent-line))
480 (csh-indent-line)))
485 (defun csh-indent-line ()
486 "Indent current line as far as it should go according
491 (beginning-of-line)
495 ;; Align this line to current nesting level
498 (level-list (csh-get-nest-level)) ; Where to nest against
499 ;; (last-line-level (car level-list))
500 (this-line-level (current-indentation))
506 (if (eq nester-column this-line-level)
508 (beginning-of-line)
517 ;; Position point on this line
520 (this-line-level (current-indentation))
522 (beginning-of-line)
526 (cond ((> this-line-level this-point);; point in initial white space
535 "From start to end, indent each line."
536 ;; The algorithm is just moving through the region line by line with
543 (beginning-of-line)
547 (csh-indent-line))
548 (forward-line 1)
556 (defun csh-line-to-string ()
558 current line"
562 (end-of-line 1)
566 "Return true if current line is a label (not the default: case label)."
573 indentation to use for this line otherwise."
576 (nest-list
581 (if (null nest-list)
587 (nest-level (car nest-list))
588 (match-line (cdr nest-list))
592 (goto-line match-line)
593 (message "Matched ... %s" (csh-line-to-string))
596 nest-level ;;Propagate a hit.
603 "If the current line matches one of the indenting keywords
610 (beginning-of-line)
622 ;; Flush control-flow labels left since they don't nest.
648 reindent the current line. If nil, indent the current line only if
649 point is at the left margin or in the line's indentation; otherwise
735 (make-local-variable 'indent-line-function)
736 (setq indent-line-function 'csh-indent-line)
769 (beginning-of-line)
875 (end-of-line)
928 (defun csh-pickup-this-line ()
929 "Pickup all completions in current line."