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

Lines Matching +defs:indent +defs:string

70 (defgroup fortran-indent nil
88 :group 'fortran-indent)
90 (defcustom fortran-tab-mode-string "/t"
92 :type 'string
93 :group 'fortran-indent)
95 (defcustom fortran-do-indent 3
98 :group 'fortran-indent)
100 (defcustom fortran-if-indent 3
103 :group 'fortran-indent)
105 (defcustom fortran-structure-indent 3
108 :group 'fortran-indent)
110 (defcustom fortran-continuation-indent 5
113 :group 'fortran-indent)
115 (defcustom fortran-comment-indent-style 'fixed
116 "*How to indent comments.
118 `fixed' indents to `fortran-comment-line-extra-indent' columns beyond
119 `fortran-minimum-statement-indent-fixed' (if `indent-tabs-mode' nil), or
120 `fortran-minimum-statement-indent-tab' (if `indent-tabs-mode' non-nil);
122 `fortran-comment-line-extra-indent'."
124 :group 'fortran-indent)
126 (defcustom fortran-comment-line-extra-indent 0
129 :group 'fortran-indent
136 :type 'string
155 :group 'fortran-indent)
157 (defcustom fortran-minimum-statement-indent-fixed 6
160 :group 'fortran-indent)
162 (defcustom fortran-minimum-statement-indent-tab (max tab-width 6)
165 :group 'fortran-indent)
167 ;; Note that this is documented in the v18 manuals as being a string
170 (defcustom fortran-comment-indent-char " "
171 "*Single-character string inserted for Fortran comment indentation.
173 :type 'string
176 (defcustom fortran-line-number-indent 1
180 :group 'fortran-indent)
188 "*Non-nil causes \\[fortran-indent-line] on ENDIF to blink on matching IF.
193 (defcustom fortran-continuation-string "$"
194 "*Single-character string used for Fortran continuation lines.
197 Also, if \\[fortran-indent-line] finds this at the beginning of a
200 :type 'string
206 :type 'string
222 :type 'string
233 :type 'string
286 (split-string
370 '("^ \\{5\\}\\([^ 0\n]\\)" 1 font-lock-string-face)
371 '("^\t\\([1-9]\\)" 1 font-lock-string-face))
431 "[ \t" fortran-continuation-string "]+"
536 (define-key map "\M-;" 'fortran-indent-comment)
540 (define-key map "\M-\C-q" 'fortran-indent-subprogram)
574 ["Indent Region" indent-region mark-active]
575 ["Indent Subprogram" fortran-indent-subprogram t]
693 \\[fortran-indent-line] indents the current Fortran line correctly.
705 To use comments starting with `!', set this to the string \"!\".
706 `fortran-do-indent'
708 `fortran-if-indent'
710 `fortran-structure-indent'
713 `fortran-continuation-indent'
715 `fortran-comment-line-extra-indent'
717 `fortran-comment-indent-style'
718 How to indent the text in full-line comments. Allowed values are:
720 fixed indent to `fortran-comment-line-extra-indent' beyond the
722 `fortran-minimum-statement-indent-fixed' (fixed format) or
723 `fortran-minimum-statement-indent-tab' (TAB format),
725 relative indent to `fortran-comment-line-extra-indent' beyond the
728 `fortran-comment-indent-char'
729 Single-character string to be inserted instead of space for
731 `fortran-minimum-statement-indent-fixed'
733 `fortran-minimum-statement-indent-tab'
735 `fortran-line-number-indent'
743 Non-nil causes \\[fortran-indent-line] on an ENDIF (or ENDDO) statement
745 `fortran-continuation-string'
746 Single-character string to be inserted in column 5 of a continuation
766 (set (make-local-variable 'indent-line-function) 'fortran-indent-line)
767 (set (make-local-variable 'indent-region-function)
770 indent-region-function)
771 (indent-region start end nil))))
783 (set (make-local-variable 'comment-indent-function) 'fortran-comment-indent)
786 (set (make-local-variable 'indent-tabs-mode) (fortran-analyze-file-format))
787 (setq mode-line-process '(indent-tabs-mode fortran-tab-mode-string))
821 (defsubst fortran-comment-indent ()
830 (defun fortran-indent-comment ()
843 (fortran-indent-line)
844 (unless (= (current-column) (fortran-comment-indent))
846 (indent-to (fortran-comment-indent)))))
851 (string-match comment-start-skip (concat " " comment-start)))
854 (indent-to (fortran-comment-indent))
864 (insert-char (if (stringp fortran-comment-indent-char)
865 (aref fortran-comment-indent-char 0)
866 fortran-comment-indent-char)
867 (- (fortran-calculate-indent) (current-column))))))
871 Inserts the string variable `fortran-comment-region' at the beginning of
937 (momentary-string-display
938 (if indent-tabs-mode
993 (insert ?\n (match-string 0))
994 (if indent-tabs-mode
996 (insert "\n " fortran-continuation-string))) ; space after \n important
997 (fortran-indent-line)) ; when cont string is C, c or *
1008 "Join current line to the previous one and re-indent.
1022 (fortran-indent-line)))
1036 "Self insert, but if part of a Fortran line number indent it automatically.
1037 Auto-indent does not happen if a numeric ARG is used."
1048 (and (= (if indent-tabs-mode
1049 fortran-minimum-statement-indent-tab
1050 fortran-minimum-statement-indent-fixed) (current-column))
1053 (not (or (eq last-command 'fortran-indent-line)
1055 'fortran-indent-new-line))))
1064 (fortran-indent-line))))
1073 (string-match "^\\s-*\\(\\'\\|\\s<\\)"
1124 (regexp-quote fortran-continuation-string)))
1131 (regexp-quote fortran-continuation-string)))
1463 (defun fortran-indent-line ()
1466 (let ((cfi (fortran-calculate-indent)))
1472 (fortran-indent-to-column cfi)
1475 (fortran-indent-comment))))
1492 (let ((cfi (fortran-calculate-indent)))
1499 (fortran-indent-to-column cfi)
1502 (fortran-indent-comment))))
1510 (defalias 'fortran-indent-new-line 'reindent-then-newline-and-indent)
1512 (defun fortran-indent-subprogram ()
1513 "Properly indent the Fortran subprogram containing point."
1518 (indent-region (point) (mark) nil))
1521 (defun fortran-calculate-indent ()
1522 "Calculates the Fortran indent column based on previous lines."
1524 (fortran-minimum-statement-indent
1525 (if indent-tabs-mode
1526 fortran-minimum-statement-indent-tab
1527 fortran-minimum-statement-indent-fixed)))
1531 (setq icol fortran-minimum-statement-indent)
1533 (setq icol fortran-minimum-statement-indent)
1547 (setq icol (+ icol fortran-if-indent))))
1549 (setq icol (+ icol fortran-if-indent)))
1551 (setq icol (+ icol fortran-if-indent)))
1553 (setq icol (+ icol fortran-if-indent)))
1555 (setq icol (+ icol fortran-if-indent)))
1557 (setq icol (+ icol fortran-if-indent)))
1559 (setq icol (+ icol fortran-if-indent)))
1561 (setq icol (+ icol fortran-do-indent)))
1565 (setq icol (+ icol fortran-structure-indent)))
1568 ;; Previous END resets indent to minimum.
1569 (setq icol fortran-minimum-statement-indent)))))
1573 ;; Check for directive before comment, so as not to indent.
1575 (setq fortran-minimum-statement-indent 0 icol 0))
1577 (cond ((eq fortran-comment-indent-style 'relative)
1578 (setq icol (+ icol fortran-comment-line-extra-indent)))
1579 ((eq fortran-comment-indent-style 'fixed)
1580 (setq icol (+ fortran-minimum-statement-indent
1581 fortran-comment-line-extra-indent))))
1582 (setq fortran-minimum-statement-indent 0))
1585 fortran-continuation-string)))
1588 ;; Do not introduce extra whitespace into a broken string.
1590 (if (fortran-is-in-string-p (point))
1592 (+ icol fortran-continuation-indent))))
1597 (setq icol (- icol fortran-do-indent)))
1601 (setq icol (- icol fortran-if-indent)))
1603 (setq icol (- icol fortran-if-indent)))
1605 (setq icol (- icol fortran-if-indent)))
1607 (setq icol (- icol fortran-if-indent)))
1610 (setq icol (- icol fortran-do-indent)))
1612 (setq icol (- icol fortran-do-indent)))
1615 (setq icol (- icol fortran-structure-indent)))
1618 (not (= icol fortran-minimum-statement-indent)))
1620 an unclosed block." fortran-minimum-statement-indent))))))
1621 (max fortran-minimum-statement-indent icol)))
1636 (if (stringp fortran-comment-indent-char)
1637 fortran-comment-indent-char
1638 (char-to-string fortran-comment-indent-char))))
1648 (defun fortran-indent-to-column (col)
1652 2) If `fortran-continuation-string' is the first non-whitespace
1660 (if fortran-comment-indent-style
1661 (let* ((char (if (stringp fortran-comment-indent-char)
1662 (aref fortran-comment-indent-char 0)
1663 fortran-comment-indent-char))
1664 (chars (string ?\s ?\t char)))
1671 (if indent-tabs-mode
1675 (insert fortran-continuation-string))
1677 (if indent-tabs-mode
1685 ((looking-at (regexp-quote fortran-continuation-string))
1686 (if indent-tabs-mode
1688 (indent-to
1689 (if indent-tabs-mode
1690 fortran-minimum-statement-indent-tab
1691 fortran-minimum-statement-indent-fixed))
1694 (indent-to 5)
1700 (indent-to (min fortran-line-number-indent extra-space))))
1705 (indent-to col)
1709 (unless (= (current-column) (fortran-comment-indent))
1711 (indent-to (fortran-comment-indent)))))))
1719 (and (<= (current-column) fortran-line-number-indent)
1720 (or (= (current-column) fortran-line-number-indent)
1767 (not (fortran-is-in-string-p (match-beginning 0))))
1776 (defun fortran-is-in-string-p (where)
1777 "Return non-nil iff WHERE (a buffer position) is inside a Fortran string."
1781 ((bolp) nil) ; bol is never inside a string
1800 ;; - not in a string and after comment-start?
1804 (char-to-string (preceding-char)))))
1814 (equal fortran-continuation-string
1815 (char-to-string (following-char)))
1843 ;; If in a string at fill-column, break it either before the
1844 ;; initial quote, or at fill-col (if string is too long).
1852 (when (fortran-is-in-string-p (setq fcpoint (point)))
1861 ;; If the current string is longer than (fill-column
1865 (- fill-column 6 fortran-continuation-indent))
1869 ;; string was found above then use that, else break the line
1924 (+ (fortran-calculate-indent)
1925 fortran-continuation-indent))))
1933 (comment-string
1947 (if comment-string
1952 (indent-to (fortran-comment-indent))
1953 (insert comment-string)))))
1999 ;; Re-indent initially.
2000 (fortran-indent-line)
2007 (fortran-indent-line)))
2036 (or (match-string-no-properties 2)