1015 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1016 |
|
|
1017 |
(defcustom sh-popup-occur-buffer nil |
(defcustom sh-popup-occur-buffer nil |
1018 |
"*Controls when `sh-learn-buffer-indent' pops the *indent* buffer. |
"*Controls when `sh-learn-buffer-indent' pops the `*indent*' buffer. |
1019 |
If t it is always shown. If nil, it is shown only when there |
If t it is always shown. If nil, it is shown only when there |
1020 |
are conflicts." |
are conflicts." |
1021 |
:type '(choice |
:type '(choice |
1044 |
|
|
1045 |
(defcustom sh-basic-offset 4 |
(defcustom sh-basic-offset 4 |
1046 |
"*The default indentation increment. |
"*The default indentation increment. |
1047 |
This value is used for the + and - symbols in an indentation variable." |
This value is used for the `+' and `-' symbols in an indentation variable." |
1048 |
:type 'integer |
:type 'integer |
1049 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1050 |
|
|
1088 |
:menu-tag "/ Indent left half sh-basic-offset"))) |
:menu-tag "/ Indent left half sh-basic-offset"))) |
1089 |
|
|
1090 |
(defcustom sh-indent-for-else 0 |
(defcustom sh-indent-for-else 0 |
1091 |
"*How much to indent an else relative to an if. Usually 0." |
"*How much to indent an `else' relative to its `if'. Usually 0." |
1092 |
:type `(choice |
:type `(choice |
1093 |
(integer :menu-tag "A number (positive=>indent right)" |
(integer :menu-tag "A number (positive=>indent right)" |
1094 |
:tag "A number") |
:tag "A number") |
1104 |
sh-symbol-list)) |
sh-symbol-list)) |
1105 |
|
|
1106 |
(defcustom sh-indent-for-fi 0 |
(defcustom sh-indent-for-fi 0 |
1107 |
"*How much to indent a fi relative to an if. Usually 0." |
"*How much to indent a `fi' relative to its `if'. Usually 0." |
1108 |
:type `(choice ,@ sh-number-or-symbol-list ) |
:type `(choice ,@ sh-number-or-symbol-list ) |
1109 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1110 |
|
|
1111 |
(defcustom sh-indent-for-done '0 |
(defcustom sh-indent-for-done 0 |
1112 |
"*How much to indent a done relative to its matching stmt. Usually 0." |
"*How much to indent a `done' relative to its matching stmt. Usually 0." |
1113 |
:type `(choice ,@ sh-number-or-symbol-list ) |
:type `(choice ,@ sh-number-or-symbol-list ) |
1114 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1115 |
|
|
1116 |
(defcustom sh-indent-after-else '+ |
(defcustom sh-indent-after-else '+ |
1117 |
"*How much to indent a statement after an else statement." |
"*How much to indent a statement after an `else' statement." |
1118 |
:type `(choice ,@ sh-number-or-symbol-list ) |
:type `(choice ,@ sh-number-or-symbol-list ) |
1119 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1120 |
|
|
1121 |
(defcustom sh-indent-after-if '+ |
(defcustom sh-indent-after-if '+ |
1122 |
"*How much to indent a statement after an if statement. |
"*How much to indent a statement after an `if' statement. |
1123 |
This includes lines after else and elif statements, too, but |
This includes lines after `else' and `elif' statements, too, but |
1124 |
does not affect then else elif or fi statements themselves." |
does not affect the `else', `elif' or `fi' statements themselves." |
1125 |
:type `(choice ,@ sh-number-or-symbol-list ) |
:type `(choice ,@ sh-number-or-symbol-list ) |
1126 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1127 |
|
|
1128 |
(defcustom sh-indent-for-then 0 |
(defcustom sh-indent-for-then 0 |
1129 |
"*How much to indent a then relative to an if." |
"*How much to indent a `then' relative to its `if'." |
1130 |
:type `(choice ,@ sh-number-or-symbol-list ) |
:type `(choice ,@ sh-number-or-symbol-list ) |
1131 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1132 |
|
|
1133 |
(defcustom sh-indent-for-do 0 |
(defcustom sh-indent-for-do 0 |
1134 |
"*How much to indent a do statement. |
"*How much to indent a `do' statement. |
1135 |
This is relative to the statement before the do, i.e. the |
This is relative to the statement before the `do', i.e. the |
1136 |
while until or for statement." |
`while', `until' or `for' statement." |
1137 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1138 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1139 |
|
|
1140 |
(defcustom sh-indent-after-do '* |
(defcustom sh-indent-after-do '+ |
1141 |
"*How much to indent a line after a do statement. |
"*How much to indent a line after a `do' statement. |
1142 |
This is used when the do is the first word of the line. |
This is used when the `do' is the first word of the line. |
1143 |
This is relative to the statement before the do, e.g. a |
This is relative to the statement before the `do', e.g. a |
1144 |
while for repeat or select statement." |
`while', `for', `repeat' or `select' statement." |
1145 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1146 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1147 |
|
|
1148 |
(defcustom sh-indent-after-loop-construct '+ |
(defcustom sh-indent-after-loop-construct '+ |
1149 |
"*How much to indent a statement after a loop construct. |
"*How much to indent a statement after a loop construct. |
1150 |
|
|
1151 |
This variable is used when the keyword \"do\" is on the same line as the |
This variable is used when the keyword `do' is on the same line as the |
1152 |
loop statement (e.g. \"until\", \"while\" or \"for\"). |
loop statement (e.g., `until', `while' or `for'). |
1153 |
If the do is on a line by itself, then `sh-indent-after-do' is used instead." |
If the `do' is on a line by itself, then `sh-indent-after-do' is used instead." |
1154 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1155 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1156 |
|
|
1157 |
|
|
1158 |
(defcustom sh-indent-after-done 0 |
(defcustom sh-indent-after-done 0 |
1159 |
"*How much to indent a statement after a \"done\" keyword. |
"*How much to indent a statement after a `done' keyword. |
1160 |
Normally this is 0, which aligns the \"done\" to the matching |
Normally this is 0, which aligns the `done' to the matching |
1161 |
looping construct line. |
looping construct line. |
1162 |
Setting it non-zero allows you to have the \"do\" statement on a line |
Setting it non-zero allows you to have the `do' statement on a line |
1163 |
by itself and align the done under to do." |
by itself and align the done under to do." |
1164 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1165 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1166 |
|
|
1167 |
(defcustom sh-indent-for-case-label '+ |
(defcustom sh-indent-for-case-label '+ |
1168 |
"*How much to indent a case label statement. |
"*How much to indent a case label statement. |
1169 |
This is relative to the line containing the case statement." |
This is relative to the line containing the `case' statement." |
1170 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1171 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1172 |
|
|
1173 |
(defcustom sh-indent-for-case-alt '++ |
(defcustom sh-indent-for-case-alt '++ |
1174 |
"*How much to indent statements after the case label. |
"*How much to indent statements after the case label. |
1175 |
This is relative to the line containing the case statement." |
This is relative to the line containing the `case' statement." |
1176 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1177 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1178 |
|
|
1184 |
|
|
1185 |
(defcustom sh-indent-after-open '+ |
(defcustom sh-indent-after-open '+ |
1186 |
"*How much to indent after a line with an opening parenthesis or brace. |
"*How much to indent after a line with an opening parenthesis or brace. |
1187 |
For an open paren after a function `sh-indent-after-function' is used." |
For an open paren after a function, `sh-indent-after-function' is used." |
1188 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1189 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1190 |
|
|
1196 |
;; These 2 are for the rc shell: |
;; These 2 are for the rc shell: |
1197 |
|
|
1198 |
(defcustom sh-indent-after-switch '+ |
(defcustom sh-indent-after-switch '+ |
1199 |
"*How much to indent a case statement relative to the switch statement. |
"*How much to indent a `case' statement relative to the `switch' statement. |
1200 |
This is for the rc shell." |
This is for the rc shell." |
1201 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1202 |
:group 'sh-indentation) |
:group 'sh-indentation) |
1203 |
|
|
1204 |
(defcustom sh-indent-after-case '+ |
(defcustom sh-indent-after-case '+ |
1205 |
"*How much to indent a statement relative to the case statement. |
"*How much to indent a statement relative to the `case' statement. |
1206 |
This is for the rc shell." |
This is for the rc shell." |
1207 |
:type `(choice ,@ sh-number-or-symbol-list) |
:type `(choice ,@ sh-number-or-symbol-list) |
1208 |
:group 'sh-indentation) |
:group 'sh-indentation) |