• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/progmodes/

Lines Matching +defs:next +defs:indent

174 (defcustom ada-broken-decl-indent 0
175 "*Number of columns to indent a broken declaration.
183 (defcustom ada-broken-indent 2
184 "*Number of columns to indent the continuation of a broken line.
191 (defcustom ada-continuation-indent ada-broken-indent
192 "*Number of columns to indent the continuation of broken lines in parenthesis.
251 (defcustom ada-indent 3
260 (defcustom ada-indent-after-return t
261 "*Non-nil means automatically indent after RET or LFD."
264 (defcustom ada-indent-align-comments t
267 Note that indentation is calculated only if `ada-indent-comment-as-code' is t.
271 -- aligned if ada-indent-align-comments is t"
274 (defcustom ada-indent-comment-as-code t
275 "*Non-nil means indent comment lines as code.
276 A nil value means do not auto-indent comments."
279 (defcustom ada-indent-handle-comment-special nil
284 a comment and `ada-indent-handle-comment-special' is t.
291 ( -- `ada-indent-handle-comment-special' is nil
296 ( -- `ada-indent-handle-comment-special' is non-nil
301 (defcustom ada-indent-is-separate t
302 "*Non-nil means indent 'is separate' or 'is abstract' if on a single line."
305 (defcustom ada-indent-record-rel-type 3
313 (defcustom ada-indent-renames ada-broken-indent
315 If `ada-indent-return' is null or negative, the indentation is done relative to
316 the open parenthesis (if there is no parenthesis, `ada-broken-indent' is used).
324 (defcustom ada-indent-return 0
326 If `ada-indent-return' is null or negative, the indentation is done relative to
327 the open parenthesis (if there is no parenthesis, `ada-broken-indent' is used).
334 (defcustom ada-indent-to-open-paren t
335 "*Non-nil means indent according to the innermost open parenthesis."
349 (defcustom ada-label-indent -4
350 "*Number of columns to indent a label.
393 (defcustom ada-stmt-end-indent 0
394 "*Number of columns to indent the end of a statement on a separate line.
401 (defcustom ada-tab-policy 'indent-auto
404 `indent-rigidly' : always adds `ada-indent' blanks at the beginning of the line.
405 `indent-auto' : use indentation functions in this file.
406 `always-tab' : do `indent-relative'."
407 :type '(choice (const indent-auto)
408 (const indent-rigidly)
412 (defcustom ada-use-indent ada-broken-indent
420 (defcustom ada-when-indent 3
428 (defcustom ada-with-indent ada-broken-indent
1118 Indent line, insert newline and indent the new line. '\\[newline-and-indent]'
1121 Indent all lines in region '\\[ada-indent-region]'
1128 Next func/proc/task '\\[ada-next-procedure]' Previous func/proc/task '\\[ada-previous-procedure]'
1129 Next package '\\[ada-next-package]' Previous package '\\[ada-previous-package]'
1135 Start a comment '\\[indent-for-comment]'
1138 Continue comment on next line '\\[indent-new-comment-line]'
1169 ;; used by autofill and indent-new-comment-line
1179 (indent-new-comment-line soft))))
1181 (set (make-local-variable 'indent-line-function)
1182 'ada-indent-current-function)
1346 ;; Support for indent-new-comment-line (Especially for XEmacs)
1368 (min ada-indent (current-column))))))
1840 ;; Some special algorithms are provided to indent the parameter lists in
1918 (ada-goto-next-non-ws)
1965 (ada-goto-next-non-ws)
1968 (ada-goto-next-non-ws))
2034 ;; yes => re-indent it
2036 (ada-indent-current)
2052 (ada-indent-current)
2064 (indent-to (+ column parlen 1))
2096 (indent-to (+ column typlen 1))
2102 ;; no => insert ';' and newline and indent
2105 (indent-to firstcol))
2109 ;; put it in a new line and indent it
2111 (ada-indent-newline-indent))
2121 ;; - offset to indent from this position (can also be a symbol or a list
2134 ;; - `ada-indent-region': Re-indent a region of text
2135 ;; - `ada-justified-indent-current': Re-indent the current line and shows the
2137 ;; - `ada-indent-current': Re-indent the current line
2138 ;; - `ada-get-current-indent': Calculate the indentation for the current line,
2140 ;; - `ada-get-indent-*': Calculate the indentation in a specific context.
2145 (defun ada-indent-region (beg end)
2162 (ada-indent-current))
2167 (defun ada-indent-newline-indent ()
2168 "Indent the current line, insert a newline and then indent the new line."
2170 (ada-indent-current)
2172 (ada-indent-current))
2174 (defun ada-indent-newline-indent-conditional ()
2175 "Insert a newline and indent it.
2176 The original line is indented first if `ada-indent-after-return' is non-nil."
2178 (if ada-indent-after-return (ada-indent-current))
2180 (ada-indent-current))
2182 (defun ada-justified-indent-current ()
2186 (let ((cur-indent (ada-indent-current)))
2189 (goto-char (car cur-indent))
2192 (if (equal (cdr cur-indent) '(0))
2203 (cdr cur-indent)
2206 (goto-char (car cur-indent))
2210 "Re-indent and re-case all the files found on the command line.
2219 (ada-indent-region (point-min) (point-max))
2229 (ada-goto-next-word t))
2231 (defun ada-indent-current ()
2238 cur-indent tmp-indent
2239 prev-indent)
2251 (setq cur-indent
2257 (ada-get-current-indent))
2262 ;; Evaluate the list to get the column to indent to
2263 ;; prev-indent contains the column to indent to
2264 (if cur-indent
2265 (setq prev-indent (save-excursion (goto-char (car cur-indent))
2267 tmp-indent (cdr cur-indent))
2268 (setq prev-indent 0 tmp-indent '()))
2270 (while (not (null tmp-indent))
2272 ((numberp (car tmp-indent))
2273 (setq prev-indent (+ prev-indent (car tmp-indent))))
2275 (setq prev-indent (+ prev-indent (eval (car tmp-indent)))))
2277 (setq tmp-indent (cdr tmp-indent)))
2279 ;; only re-indent if indentation is different then the current
2280 (if (= (save-excursion (back-to-indentation) (current-column)) prev-indent)
2284 (indent-to prev-indent))
2298 cur-indent
2301 (defun ada-get-current-indent ()
2320 ((and ada-indent-to-open-paren
2340 (list column 'ada-broken-indent)
2349 ;; and then C) -- indented by ada-broken-indent
2359 (list column 'ada-continuation-indent)
2367 (ada-indent-on-previous-lines nil orgpoint orgpoint))
2405 (setq label (- ada-label-indent))))))))
2409 ;; after limited, we indent on it, otherwise we indent on the
2438 (ada-indent-on-previous-lines nil orgpoint orgpoint)
2461 'ada-when-indent)))
2471 (ada-indent-on-previous-lines nil orgpoint orgpoint)
2477 'ada-stmt-end-indent))))
2490 (ada-indent-on-previous-lines nil orgpoint orgpoint)
2495 (ada-indent-on-previous-lines nil orgpoint orgpoint)
2496 (list (progn (back-to-indentation) (point)) 'ada-stmt-end-indent)))))
2514 'ada-indent-record-rel-type)))
2525 (ada-indent-on-previous-lines nil orgpoint orgpoint))))
2534 (if (and ada-indent-is-separate
2537 (ada-goto-next-non-ws (save-excursion (end-of-line)
2542 (list (progn (back-to-indentation) (point)) 'ada-indent))
2547 (list (progn (back-to-indentation) (point)) 'ada-indent)))))
2557 (let ((var 'ada-indent-return))
2566 (set 'var 'ada-indent-renames)))
2586 ;; The indentation depends of the value of ada-indent-return
2593 ;; Only do something special if the user want to indent
2601 (ada-indent-on-previous-lines nil orgpoint orgpoint)))))))
2626 (list (progn (back-to-indentation) (point)) 'ada-stmt-end-indent)))
2633 (if ada-indent-comment-as-code
2640 (if (and ada-indent-align-comments
2655 (ada-indent-on-previous-lines nil orgpoint orgpoint)))
2684 (ada-indent-on-previous-lines nil orgpoint orgpoint))
2707 (ada-indent-on-previous-lines nil orgpoint orgpoint))))
2715 (ada-indent-on-previous-lines nil orgpoint orgpoint)
2716 (append (ada-indent-on-previous-lines nil orgpoint orgpoint)
2717 '(ada-label-indent))))
2724 (or result (ada-indent-on-previous-lines nil orgpoint orgpoint))))
2726 (defun ada-indent-on-previous-lines (&optional nomove orgpoint initial-pos)
2737 (ada-get-indent-paramlist)
2746 (ada-get-indent-nochange)
2751 ada-indent-to-open-paren
2753 (ada-get-indent-open-paren))
2756 (ada-get-indent-end orgpoint))
2759 (ada-get-indent-loop orgpoint))
2762 (ada-get-indent-subprog orgpoint))
2765 (ada-get-indent-block-start orgpoint))
2768 (ada-get-indent-type orgpoint))
2774 (ada-get-indent-if orgpoint))
2777 (ada-get-indent-case orgpoint))
2780 (ada-get-indent-when orgpoint))
2783 (ada-get-indent-label orgpoint))
2786 (ada-get-indent-nochange))
2791 (- ada-label-indent))))
2800 'ada-with-indent
2801 'ada-use-indent))))
2804 (ada-get-indent-noindent orgpoint)))))
2807 (defun ada-get-indent-open-paren ()
2811 (defun ada-get-indent-nochange ()
2818 (defun ada-get-indent-paramlist ()
2831 (ada-goto-next-non-ws)
2838 (list (point) 'ada-broken-indent))
2843 (ada-goto-next-non-ws)
2846 (defun ada-get-indent-end (orgpoint)
2850 (indent nil))
2860 (ada-goto-next-non-ws)
2896 (setq indent (list (point) 0))
2899 indent))
2907 'ada-broken-indent))))
2910 'ada-broken-indent))))
2912 (defun ada-get-indent-case (orgpoint)
2932 (list (save-excursion (back-to-indentation) (point)) 'ada-indent)))
2940 (list (save-excursion (back-to-indentation) (point)) 'ada-broken-indent))
2947 (list (save-excursion (back-to-indentation) (point)) 'ada-when-indent))
2953 'ada-broken-indent)))))
2955 (defun ada-get-indent-when (orgpoint)
2958 (let ((cur-indent (save-excursion (back-to-indentation) (point))))
2960 (list cur-indent 'ada-indent)
2961 (list cur-indent 'ada-broken-indent))))
2963 (defun ada-get-indent-if (orgpoint)
2966 (let ((cur-indent (save-excursion (back-to-indentation) (point)))
2980 ;; => indent according to 'then',
2981 ;; => else indent according to 'if'
2986 (setq cur-indent (save-excursion (back-to-indentation) (point))))
2989 (list cur-indent 'ada-indent))
2991 (list cur-indent 'ada-broken-indent))))
2993 (defun ada-get-indent-block-start (orgpoint)
3000 (setq pos (ada-goto-next-non-ws orgpoint)))
3003 (ada-indent-on-previous-lines t orgpoint)))
3011 ;; If record is at the beginning of the line, indent from there
3015 (list (save-excursion (back-to-indentation) (point)) 'ada-indent)
3017 ;; else indent relative to the type command
3020 'ada-indent)))
3024 (list (save-excursion (back-to-indentation) (point)) 'ada-indent)))))
3026 (defun ada-get-indent-subprog (orgpoint)
3030 (cur-indent (save-excursion (back-to-indentation) (point)))
3046 ;; no, then goto next non-ws, if there is one in front of point
3049 (unless (ada-goto-next-non-ws orgpoint)
3061 (list cur-indent 'ada-indent))
3074 (ada-get-indent-noindent orgpoint))
3080 (save-excursion (setq match-cons (ada-goto-next-non-ws orgpoint)))
3082 (ada-indent-on-previous-lines t orgpoint)))
3088 (list cur-indent 0))
3093 (list cur-indent 'ada-broken-indent)))))
3095 (defun ada-get-indent-noindent (orgpoint)
3115 'ada-broken-decl-indent))
3121 (setq label (- ada-label-indent))
3147 'ada-broken-indent)))))))
3149 (defun ada-get-indent-label (orgpoint)
3153 (cur-indent (save-excursion (back-to-indentation) (point))))
3161 (ada-get-indent-loop orgpoint))
3168 (list (save-excursion (back-to-indentation) (point)) 'ada-indent))
3174 (list cur-indent 0)
3175 (list cur-indent 'ada-broken-indent)))
3179 (list cur-indent '(- ada-label-indent))))))
3181 (defun ada-get-indent-loop (orgpoint)
3191 (- ada-label-indent)
3207 (setq pos (ada-get-indent-block-start orgpoint))
3223 (ada-goto-next-non-ws orgpoint)
3226 (ada-goto-next-non-ws orgpoint)
3238 (list (save-excursion (back-to-indentation) (point)) 'ada-indent))
3239 (list (save-excursion (back-to-indentation) (point)) 'ada-broken-indent))
3250 ;; indent according to 'loop', if it's first in the line;
3258 'ada-indent))
3264 'ada-broken-indent))))
3280 ;; indent according to 'loop', if it's first in the line;
3288 'ada-indent))
3291 'ada-broken-indent))))))
3293 (defun ada-get-indent-type (orgpoint)
3305 (ada-goto-next-non-ws)
3308 (ada-goto-next-non-ws)
3319 (list (save-excursion (back-to-indentation) (point)) 'ada-indent))
3334 (not (ada-goto-next-non-ws orgpoint))))
3335 (list (save-excursion (back-to-indentation) (point)) 'ada-broken-indent))
3341 'ada-broken-indent)))))
3367 (ada-goto-next-non-ws orgpoint))
3374 ;; if found the correct end-statement => goto next non-ws
3378 (ada-goto-next-non-ws)
3390 (unless (ada-goto-next-non-ws orgpoint)
3427 (ada-goto-next-non-ws)
3451 (defun ada-goto-next-non-ws (&optional limit)
3452 "Skip white spaces, newlines and comments to next non-ws character.
3478 (defun ada-goto-next-word (&optional backward)
3479 "Move point to the beginning of the next word of Ada code.
3799 (ada-goto-next-non-ws)
3815 (ada-goto-next-non-ws)
3821 (ada-goto-next-non-ws);; skip type name
3991 (ada-goto-next-non-ws)
4004 (ada-goto-next-non-ws)
4013 (ada-goto-next-non-ws)
4244 (if (or (not ada-indent-handle-comment-special)
4261 (cond ((eq ada-tab-policy 'indent-rigidly) (ada-tab-hard))
4262 ((eq ada-tab-policy 'indent-auto)
4264 (ada-indent-region (region-beginning) (region-end))
4265 (ada-indent-current)))
4273 (cond ((eq ada-tab-policy 'indent-rigidly) (ada-untab-hard))
4274 ((eq ada-tab-policy 'indent-auto) (error "Not implemented"))
4278 (defun ada-indent-current-function ()
4279 "Ada mode version of the `indent-line-function'."
4290 "Indent current line to next tab stop."
4294 (insert-char ? ada-indent))
4296 (forward-char ada-indent)))
4303 (indent-rigidly bol eol (- 0 ada-indent))))
4484 (ada-goto-next-non-ws)
4522 (defun ada-next-procedure ()
4523 "Move point to next procedure."
4538 (defun ada-next-package ()
4539 "Move point to next package."
4564 (define-key ada-mode-map "\C-j" 'ada-indent-newline-indent-conditional)
4565 (define-key ada-mode-map "\C-m" 'ada-indent-newline-indent-conditional)
4567 (define-key ada-mode-map "\C-c\t" 'ada-justified-indent-current)
4568 (define-key ada-mode-map "\C-c\C-l" 'ada-indent-region)
4576 (define-key ada-mode-map "\M-\C-e" 'ada-next-procedure)
4686 (setq ada-indent-after-return (not ada-indent-after-return))
4687 :style toggle :selected ada-indent-after-return]
4738 ["Next compilation error" next-error t]
4740 ["Next Package" ada-next-package t]
4742 ["Next Procedure" ada-next-procedure t]
4753 ["Indent Line" ada-indent-current-function t]
4754 ["Justify Current Indentation" ada-justified-indent-current t]
4755 ["Indent Lines in Selection" ada-indent-region t]
4757 (ada-indent-region (point-min) (point-max)) t]
4865 (ada-indent-region beg end)))
4891 (let* (indent from to
4930 (setq indent (current-column))
4944 (set-left-margin from to indent)
5088 func-name indent
5134 (setq indent (current-column))
5137 (make-string indent ? ) "end;"))
5387 ;; look for next non WS
5391 (ada-indent-newline-indent)
5393 (ada-indent-newline-indent)
5397 (ada-indent-newline-indent)))
5399 (ada-indent-newline-indent)
5403 (ada-indent-newline-indent)
5405 (ada-indent-newline-indent)