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

Lines Matching +defs:indent +defs:string

74 ;; * indent-tcl-exp is untested.
91 ;; * Write indent-region function that is faster than indenting each
102 ;; * `#' shouldn't insert `\#' when point is in string.
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.
184 :type 'string
189 :type '(repeat string)
202 "*Format-string for building a Tcl command to load a file.
203 This format string should use `%s' to substitute a file name
207 :type 'string
210 (defface tcl-escaped-newline '((t :inherit font-lock-string-face))
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)]
402 "socket" "source" "split" "string" "subst" "tell" "time" "trace"
451 * a string, which must exactly match the string at the corresponding
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)
789 ;; Abort loop if string does not match word on
792 (not (string= (car entry)
808 (defun tcl-calculate-indent (&optional parse-start)
810 In usual case returns an integer: the column to indent to.
811 Returns nil if line starts inside a string, t if in a comment."
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))
836 ;; Inside comment or string. Return nil or t if should
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
929 ;; does not end inside a comment or string.
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)))))))))
1019 (match-string 2))))
1040 (defun tcl-filter (proc string)
1049 (comint-output-filter proc string))
1051 (defun tcl-send-string (proc string)
1057 (comint-send-string proc string))
1097 (tcl-send-string proc "\n")
1161 (read-string "Run Tcl: " tcl-application)
1170 (tcl-send-string (inferior-tcl-proc)
1340 (if (or (null word) (string= word ""))
1347 (if (string= command "")
1361 (if (string= command "")
1397 (tcl-send-string (inferior-tcl-proc)
1499 (defun tcl-comment-indent ()
1508 (funcall (default-value 'comment-indent-function)))
1524 (set (make-local-variable 'tcl-application) (match-string 1)))))
1550 (defun tcl-quote (string)
1554 (concat "\\" (char-to-string char))
1555 (char-to-string char)))
1556 string ""))
1566 (defalias 'tcl-indent-for-comment 'comment-indent)
1568 (defalias 'indent-tcl-exp 'tcl-indent-exp)
1569 (defalias 'calculate-tcl-indent 'tcl-calculate-indent)