Lines Matching +defs:match +defs:line

33 ;;                csh-mode looks at the first line and indents properly to line
67 ;; -match- : used by match-beginning/end to pickup target
72 (defvar csh-completion-match-var 1)
74 (defvar csh-completion-match-var2 2)
78 (defvar csh-completion-match-function 2)
95 (defvar csh-match-and-tell t
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
113 "Regexp used to match case-items")
116 "Regexp used to match keyword: end")
119 "Regexp used to match keyword: endif")
122 "Regexp used to match keyword: endsw")
125 "Regexp used to match keyword: else")
128 "Regexp used to match keyword pair: else if")
131 "Regexp used to match non-one-line if statements")
141 "Regexp used to match flow-control labels")
144 "Regexp used to match a line with a statement using more lines.")
147 "Regexp used to match keyword: switch")
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)
292 of the matching compound command or nil if no match found."
295 (match-point (if (re-search-backward begin-re (point-min) t)
296 (match-beginning 0) 0))
297 (nest-column (if (zerop match-point)
300 (goto-char match-point)
304 (if (zerop match-point)
315 (goto-char match-point) ;; beginning of compound cmd
324 (goto-char match-point)
325 (cons nest-column (csh-current-line)))
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))))
377 (goto-char (match-beginning 0))
384 (goto-char (match-beginning 0))
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))
424 (goto-char (match-beginning 1))
435 (goto-char (match-end 1))
438 (goto-char (match-beginning 1))
448 (goto-char (match-end 1))
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
499 ;; (last-line-level (car level-list))
500 (this-line-level (current-indentation))
502 (struct-match (csh-match-structure-and-reindent))
504 (if struct-match
505 (setq nester-column struct-match))
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
537 ;; the match noise turned off. Only modifies nonempty lines.
539 (let (csh-match-and-tell
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)."
571 (defun csh-match-indent-level (begin-re end-re)
572 "Match the compound command and indent. Return nil on no match,
573 indentation to use for this line otherwise."
583 (if csh-match-and-tell
588 (match-line (cdr nest-list))
590 (if csh-match-and-tell
592 (goto-line match-line)
593 (message "Matched ... %s" (csh-line-to-string))
595 ) ;; if csh-match-and-tell
600 ) ;; defun csh-match-indent-level
602 (defun csh-match-structure-and-reindent ()
603 "If the current line matches one of the indenting keywords
605 if csh-match-and-tell is non-nil the matching structure will echo in
610 (beginning-of-line)
612 (csh-match-indent-level csh-if-re csh-endif-re))
614 (csh-match-indent-level csh-if-re csh-endif-re))
616 (csh-match-indent-level csh-if-re csh-endif-re))
618 (csh-match-indent-level csh-iteration-keywords-re csh-end-re))
620 (csh-match-indent-level csh-switch-re csh-endsw-re))
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
651 csh-match-and-tell
725 (setq csh-match-and-tell t)
735 (make-local-variable 'indent-line-function)
736 (setq indent-line-function 'csh-indent-line)
769 (beginning-of-line)
875 (end-of-line)
883 (defun csh-pickup-completion (regexp type match pmin pmax)
891 (match-beginning match)
893 (match-beginning match)
894 (match-end match))))
913 csh-completion-match-var
918 csh-completion-match-var2
923 csh-completion-match-function
928 (defun csh-pickup-this-line ()
929 "Pickup all completions in current line."