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

Lines Matching +defs:indent +defs:string

53 ;; start-string/regexp  indent         variable holding start-string/regexp
65 ;; Trailing comments are indented to comment-column with indent-for-comment.
86 ;; '(lambda () (setq f90-do-indent 3
87 ;; f90-if-indent 3
88 ;; f90-type-indent 3
89 ;; f90-program-indent 2
90 ;; f90-continuation-indent 5
100 ;; indent-tabs-mode nil
135 ;; f90-indent-line f90-indent-new-line
136 ;; f90-indent-region (can be called by calling indent-region)
137 ;; f90-indent-subprogram
170 (defgroup f90-indent nil
176 (defcustom f90-do-indent 3
179 :group 'f90-indent)
181 (defcustom f90-if-indent 3
184 :group 'f90-indent)
186 (defcustom f90-type-indent 3
189 :group 'f90-indent)
191 (defcustom f90-program-indent 2
194 :group 'f90-indent)
196 (defcustom f90-continuation-indent 5
199 :group 'f90-indent)
203 :type 'string
204 :group 'f90-indent)
207 "*Regexp matching comments to indent as code."
209 :group 'f90-indent)
214 :group 'f90-indent)
428 (modify-syntax-entry ?\' "\"" table) ; string quote
429 (modify-syntax-entry ?\" "\"" table) ; string quote
453 (define-key map "\C-\M-q" 'f90-indent-subprogram)
454 (define-key map "\C-j" 'f90-indent-new-line) ; LFD equals C-j
465 (define-key map "\t" 'f90-indent-line)
483 ["Indent Subprogram" f90-indent-subprogram t]
489 ["Indent Region" f90-indent-region mark-active]
759 \\[f90-indent-line] indents the current line.
760 \\[f90-indent-new-line] indents current line and creates a new\
762 \\[f90-indent-subprogram] indents the current subprogram.
772 `f90-do-indent'
774 `f90-if-indent'
776 `f90-type-indent'
778 `f90-program-indent'
781 `f90-continuation-indent'
819 (set (make-local-variable 'indent-line-function) 'f90-indent-line)
820 (set (make-local-variable 'indent-region-function) 'f90-indent-region)
824 (set (make-local-variable 'comment-indent-function) 'f90-comment-indent)
827 (setq indent-tabs-mode nil) ; auto buffer local
847 (defsubst f90-in-string ()
848 "Return non-nil if point is inside a string.
884 ;; cf f90-indent-line
888 ;; (f90-indent-line-no)
894 (defsubst f90-indent-to (col &optional no-line-number)
903 (indent-to col (if (zerop (current-column)) 0 1)))
906 "If point lies within a comment, return the string starting the comment.
914 (while (f90-in-string)
916 (match-string-no-properties 0))))
927 (list (match-string 3) (match-string 2))))
934 (list (match-string 3) (match-string 2))))
941 (let ((struct (match-string 3))
942 (label (match-string 2))
959 (let ((struct (match-string 3))
960 (label (match-string 2))
971 (list (match-string 1) (match-string 2)))
973 (list (match-string 1) nil))))
980 (list (match-string 1) (match-string 2)))
983 (list (match-string 1) (match-string 2)))
987 (list (match-string 1) (match-string 2)))))
991 ;; change to eg f90-calculate-indent.
1000 (list (match-string 1) (match-string 3))))
1002 (defsubst f90-comment-indent ()
1004 Used for `comment-indent-function' by F90 mode.
1006 `f90-indented-comment-re' (if not trailing code) calls `f90-calculate-indent'.
1013 ;; Don't attempt to indent trailing comment as code.
1017 (f90-calculate-indent))
1040 (defsubst f90-indent-line-no ()
1078 (defun f90-get-correct-indent ()
1079 "Get correct indent for a line starting with line number.
1095 (setq icol (+ icol f90-do-indent)))
1099 (setq icol (+ icol f90-if-indent))))
1106 (setq icol (+ icol f90-do-indent)))
1110 (setq icol (+ icol f90-if-indent)))
1112 (setq icol (- icol f90-if-indent)))
1114 (setq icol (- icol f90-do-indent))))
1118 (defun f90-calculate-indent ()
1119 "Calculate the indent column based on previous statements."
1136 f90-program-indent))
1143 f90-continuation-indent)))
1148 (setq icol (f90-get-correct-indent))
1153 (setq icol (+ icol f90-if-indent)))
1155 (setq icol (+ icol f90-do-indent)))
1157 (setq icol (+ icol f90-type-indent)))
1160 (setq icol (+ icol f90-program-indent)))))
1170 (setq icol (- icol f90-if-indent)))
1172 (setq icol (- icol f90-do-indent)))
1174 (setq icol (- icol f90-type-indent)))
1177 (setq icol (- icol f90-program-indent))))))
1273 (cond ((or (f90-in-string) (f90-in-comment)))
1286 (setq end-type (match-string 1)
1287 end-label (match-string 2)
1328 (cond ((or (f90-in-string) (f90-in-comment)))
1331 (setq end-list (cons (list (match-string 1) (match-string 2))
1373 (cond ((or (f90-in-string) (f90-in-comment)))
1428 (defun f90-indent-line (&optional no-update)
1435 indent no-line-number)
1439 (f90-indent-line-no)
1443 (setq indent (f90-comment-indent))
1446 (setq indent (f90-calculate-indent)))
1447 (or (= indent (current-column))
1448 (f90-indent-to indent no-line-number))
1459 (defun f90-indent-new-line ()
1460 "Re-indent current line, insert a newline and indent the newline.
1466 (f90-indent-line) ; calls indent-line-no, update-line
1469 (let ((string (f90-in-string))
1471 (and string (not cont) (insert "&"))
1473 (if (or string (and cont f90-beginning-ampersand)) (insert "&")))
1474 (f90-indent-line 'no-update)) ; nothing to update
1478 ;; Why is second line getting extra indent over first?
1479 (defun f90-indent-region (beg-region end-region)
1490 (progn (f90-indent-line 'no-update)
1499 (f90-indent-line 'no-update)
1505 ind-b (cond ((setq struct (f90-looking-at-do)) f90-do-indent)
1510 f90-if-indent)
1512 f90-type-indent)
1515 f90-program-indent)))
1521 (f90-indent-to (f90-comment-indent))
1523 (+ ind-curr f90-continuation-indent))
1524 (f90-indent-to (+ ind-curr f90-continuation-indent) 'no-line-no))))
1528 (f90-indent-line-no)
1532 ((looking-at "!") (setq ind-curr (f90-comment-indent)))
1535 (- ind-lev f90-if-indent)))
1537 (setq ind-curr (- ind-lev f90-program-indent)))
1539 (cond ((setq struct (f90-looking-at-do)) f90-do-indent)
1543 f90-if-indent)
1545 f90-type-indent)
1547 f90-program-indent)))
1559 (cond ((looking-at f90-end-if-re) f90-if-indent)
1560 ((looking-at "end[ \t]*do\\>") f90-do-indent)
1561 ((looking-at f90-end-type-re) f90-type-indent)
1563 f90-program-indent)))
1569 (f90-indent-to ind-curr))
1573 (f90-indent-to (f90-comment-indent))
1575 (+ ind-curr f90-continuation-indent))
1576 (f90-indent-to
1577 (+ ind-curr f90-continuation-indent) 'no-line-no)))))
1587 (defun f90-indent-subprogram ()
1588 "Properly indent the subprogram containing point."
1596 (indent-region (point) (mark) nil)
1600 (indent-region (point) (mark) nil)
1604 "Break line at point, insert continuation marker(s) and indent.
1605 Unless in a string or comment, or if the optional argument NO-UPDATE
1608 (cond ((f90-in-string)
1617 (indent-according-to-mode))
1643 (or (f90-in-string) (f90-find-breakpoint))
1665 (or (f90-in-string)
1706 ;; f90-indent-region on a program block without an explicit PROGRAM
1757 (cond ((or (f90-in-string) (f90-in-comment)))
1796 (f90-indent-new-line)))
1895 (or (string= saveword (buffer-substring back-point ref-point))