X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/9611c98636eeb84b933d237218716f7809915847..f10533854f4c7bb54247a11981191bf37b70cb36:/packages/ada-mode/ada-indent-user-options.el diff --git a/packages/ada-mode/ada-indent-user-options.el b/packages/ada-mode/ada-indent-user-options.el index 78e1854e9..267ac41e5 100644 --- a/packages/ada-mode/ada-indent-user-options.el +++ b/packages/ada-mode/ada-indent-user-options.el @@ -1,4 +1,4 @@ -;;; user options shared by Ada mode indentation engines -*- lexical-binding:t -*- +;; user options shared by Ada mode indentation engines -*- lexical-binding:t -*- ;; ;; Copyright (C) 2012, 2013, 2015 Free Software Foundation, Inc. ;; @@ -56,16 +56,30 @@ begin Example : My_Var : My_Type := >>(Field1 => Value);" - :type 'integer - :safe #'integerp) + :type 'integer + :safe #'integerp) (make-variable-buffer-local 'ada-indent-broken) (defcustom ada-indent-comment-col-0 nil "If non-nil, comments currently starting in column 0 are left in column 0. Otherwise, they are indented with previous comments or code." + :type 'boolean + :safe #'booleanp) +(make-variable-buffer-local 'ada-indent-comment-col-0) + +(defcustom ada-indent-comment-gnat nil + "If non-nil, comments are indented to meet the GNAT comment style check. +That is, one of: + +- multiple of ada-indent +- next non-blank line +- previous non-blank line + +Otherwise, they are indented as a with previous comments or code." :type 'boolean + :group 'ada-indentation :safe #'booleanp) -(make-variable-buffer-local 'ada-indent-comment-col-0) +(make-variable-buffer-local 'ada-indent-comment-gnat) (defvar ada-label-indent nil) (make-obsolete-variable @@ -96,19 +110,19 @@ Example : (make-variable-buffer-local 'ada-indent-label) (defcustom ada-indent-record-rel-type 3 - "Indentation for 'record' relative to 'type' or 'use'. + "Indentation for `record' relative to `type' or `use'. An example is: type A is >>>record" - :type 'integer - :safe #'integerp) + :type 'integer + :safe #'integerp) (make-variable-buffer-local 'ada-indent-record-rel-type) (defcustom ada-indent-renames 2 - "Indentation for 'renames' relative to the matching subprogram keyword. + "Indentation for `renames' relative to the matching subprogram keyword. -For 'renames' of non-subprograms the indentation is +For `renames' of non-subprograms the indentation is `ada-indent-broken' relative to the line containing the matching keyword. @@ -130,26 +144,26 @@ Examples: function A (B : Integer) return C >>>>>>>>>>>renames Foo;" - :type 'integer - :safe #'integerp) + :type 'integer + :safe #'integerp) (make-variable-buffer-local 'ada-indent-renames) (defcustom ada-indent-return 0 - "Indentation for 'return' relative to the matching 'function' keyword. + "Indentation for `return' relative to the matching `function' keyword. If the function has parameters, then if `ada-indent-return' is zero or less the indentation is abs `ada-indent-return' relative to the open parenthesis; if `ada-indent-return' is one or more, -indentation is relative to line containing 'function'. +indentation is relative to line containing `function'. If the function has no parameters, `ada-indent-broken' is used -relative to line containing 'function'. +relative to line containing `function'. An example is: function A (B : Integer) >>>>>>>>>>>return C;" - :type 'integer - :safe #'integerp) + :type 'integer + :safe #'integerp) (make-variable-buffer-local 'ada-indent-return) (defvar ada-use-indent nil) @@ -164,13 +178,13 @@ An example is: (message "WARNING: setting `ada-indent-use' to obsolete `ada-use-indent'") ada-use-indent) ada-indent-broken) - "Indentation for the lines in a 'use' statement. + "Indentation for the lines in a `use' statement. An example is: use Ada.Text_IO, >>Ada.Numerics;" - :type 'integer - :safe #'integerp) + :type 'integer + :safe #'integerp) (make-variable-buffer-local 'ada-indent-use) (defvar ada-when-indent nil) @@ -185,7 +199,7 @@ An example is: (message "WARNING: setting `ada-indent-when' to obsolete `ada-when-indent'") ada-when-indent) 3) - "Indentation for 'when' relative to 'exception', 'case', 'or' in select. + "Indentation for `when' relative to `exception', `case', `or' in select. An example is: case A is @@ -206,13 +220,13 @@ An example is: (message "WARNING: setting `ada-indent-with' to obsolete `ada-with-indent'") ada-with-indent) ada-indent-broken) - "Indentation for the lines in a 'with' context clause. + "Indentation for the lines in a `with' context clause. An example is: with Ada.Text_IO, >>Ada.Numerics;" - :type 'integer - :safe #'integerp) + :type 'integer + :safe #'integerp) (make-variable-buffer-local 'ada-indent-with) (provide 'ada-indent-user-options)