• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/progmodes/

Lines Matching defs:indent

74 ;; * indent-tcl-exp is untested.
91 ;; * Write indent-region function that is faster than indenting each
126 (defcustom tcl-indent-level 4
131 (defcustom tcl-continued-indent-level 4
141 (defcustom tcl-tab-always-indent tab-always-indent
143 If t (the default), always indent current line.
227 (define-key map "\e\C-q" 'tcl-indent-exp)
229 (define-key map "\t" 'tcl-indent-command)
290 ["Indent region" indent-region (mark t)]
560 `tcl-indent-level'
562 `tcl-continued-indent-level'
567 `tcl-tab-always-indent'
585 (set (make-local-variable 'indent-line-function) 'tcl-indent-line)
586 (set (make-local-variable 'comment-indent-function) 'tcl-comment-indent)
640 (tcl-indent-line)
645 (tcl-indent-line))))
661 (tcl-indent-line)
667 (tcl-indent-line)
671 (tcl-indent-line))
676 (defun tcl-indent-command (&optional arg)
678 If `tcl-tab-always-indent' is t (the default), always indent current line.
679 If `tcl-tab-always-indent' is nil and point is not in the indentation
681 Other values of `tcl-tab-always-indent' cause the first possible action
691 (if (memq tcl-tab-always-indent '(nil t))
692 (let ((tab-always-indent tcl-tab-always-indent))
693 (call-interactively 'indent-for-tab-command))
703 (tcl-indent-line)
719 (tcl-indent-line)
720 (indent-for-comment))
724 (tcl-indent-line))
726 (tcl-indent-line)
727 (comment-indent))
731 (tcl-indent-line)
732 (indent-for-comment))))))
734 (defun tcl-indent-line ()
737 (let ((indent (tcl-calculate-indent nil))
741 (if (null indent)
746 (if (listp indent) (setq indent (car indent)))
748 (setq indent (- indent tcl-indent-level)))
750 (setq indent (- indent 1))))
752 (setq shift-amt (- indent (current-column)))
757 (indent-to indent)
808 (defun tcl-calculate-indent (&optional parse-start)
810 In usual case returns an integer: the column to indent to.
814 (let* ((indent-point (point))
822 (continued-indent-value (if continued-line
823 tcl-continued-indent-level
831 (while (< (point) indent-point)
833 (setq state (parse-partial-sexp (point) indent-point 0))
841 continued-indent-value)
852 ;; Find the first statement in the block and indent
864 (if (and (< (point) indent-point)
868 (while (and (< (point) indent-point)
885 (if (>= (point) indent-point)
890 (+ (current-column) continued-indent-value))
896 ;; another indent step. If we are in the body part
900 (if (and (< (point) indent-point)
906 (+ (current-indentation) tcl-indent-level)))))))))
911 (defun tcl-indent-exp ()
914 (let ((indent-stack (list nil))
918 this-indent continued-line
939 (tcl-indent-line))
951 (setq indent-stack (cdr indent-stack)
956 (setq indent-stack (cons nil indent-stack)
973 (if (and (car indent-stack)
974 (>= (car indent-stack) 0))
976 (setq this-indent (car indent-stack))
978 ;; Compute the standard indent for this level.
979 (let ((val (tcl-calculate-indent
980 (if (car indent-stack)
981 (- (car indent-stack))))))
982 (setcar indent-stack
983 (setq this-indent val))
985 (cond ((not (numberp this-indent)))
987 (setq this-indent (- this-indent tcl-indent-level)))
989 (setq this-indent (- this-indent 1))))
991 (or (null this-indent)
994 (+ this-indent tcl-indent-level)
995 this-indent))
998 (indent-to
1000 (+ this-indent tcl-indent-level)
1001 this-indent)))))))))
1499 (defun tcl-comment-indent ()
1508 (funcall (default-value 'comment-indent-function)))
1566 (defalias 'tcl-indent-for-comment 'comment-indent)
1568 (defalias 'indent-tcl-exp 'tcl-indent-exp)
1569 (defalias 'calculate-tcl-indent 'tcl-calculate-indent)