diff options
| author | Stefan Kangas | 2021-02-26 17:05:18 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-02-26 17:11:49 +0100 |
| commit | e95b3e4d1d7372beb576b2a12f80d331742e4f7d (patch) | |
| tree | 65451d789d66568b0529143c81ed41df7ea086de | |
| parent | ffdb0a2d8e64980d63b7c1c6c71ac6e2d26b4fb2 (diff) | |
| download | emacs-e95b3e4d1d7372beb576b2a12f80d331742e4f7d.tar.gz emacs-e95b3e4d1d7372beb576b2a12f80d331742e4f7d.zip | |
* lisp/progmodes/dcl-mode.el: Minor doc fixes.
| -rw-r--r-- | lisp/progmodes/dcl-mode.el | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 6ffceb444c1..14eefdca1e6 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -93,10 +93,10 @@ Presently this includes some syntax, .OP.erators, and \"f$\" lexicals.") | |||
| 93 | (defcustom dcl-basic-offset 4 | 93 | (defcustom dcl-basic-offset 4 |
| 94 | "Number of columns to indent a block in DCL. | 94 | "Number of columns to indent a block in DCL. |
| 95 | A block is the commands between THEN-ELSE-ENDIF and between the commands | 95 | A block is the commands between THEN-ELSE-ENDIF and between the commands |
| 96 | dcl-block-begin-regexp and dcl-block-end-regexp. | 96 | `dcl-block-begin-regexp' and `dcl-block-end-regexp'. |
| 97 | 97 | ||
| 98 | The meaning of this variable may be changed if | 98 | The meaning of this variable may be changed if |
| 99 | dcl-calc-command-indent-function is set to a function." | 99 | `dcl-calc-command-indent-function' is set to a function." |
| 100 | :type 'integer) | 100 | :type 'integer) |
| 101 | 101 | ||
| 102 | 102 | ||
| @@ -105,7 +105,7 @@ dcl-calc-command-indent-function is set to a function." | |||
| 105 | A continuation line is a line that follows a line ending with `-'. | 105 | A continuation line is a line that follows a line ending with `-'. |
| 106 | 106 | ||
| 107 | The meaning of this variable may be changed if | 107 | The meaning of this variable may be changed if |
| 108 | dcl-calc-cont-indent-function is set to a function." | 108 | `dcl-calc-cont-indent-function' is set to a function." |
| 109 | :type 'integer) | 109 | :type 'integer) |
| 110 | 110 | ||
| 111 | 111 | ||
| @@ -121,7 +121,7 @@ A command line is a line that starts with `$'." | |||
| 121 | (defcustom dcl-margin-label-offset 2 | 121 | (defcustom dcl-margin-label-offset 2 |
| 122 | "Number of columns to indent a margin label in DCL. | 122 | "Number of columns to indent a margin label in DCL. |
| 123 | A margin label is a label that doesn't begin or end a block, i.e. it | 123 | A margin label is a label that doesn't begin or end a block, i.e. it |
| 124 | doesn't match dcl-block-begin-regexp or dcl-block-end-regexp." | 124 | doesn't match `dcl-block-begin-regexp' or `dcl-block-end-regexp'." |
| 125 | :type 'integer) | 125 | :type 'integer) |
| 126 | 126 | ||
| 127 | 127 | ||
| @@ -169,8 +169,8 @@ If this variable is nil, the indentation is calculated as | |||
| 169 | CUR-INDENT + EXTRA-INDENT. | 169 | CUR-INDENT + EXTRA-INDENT. |
| 170 | 170 | ||
| 171 | This package includes two functions suitable for this: | 171 | This package includes two functions suitable for this: |
| 172 | dcl-calc-command-indent-multiple | 172 | `dcl-calc-command-indent-multiple' |
| 173 | dcl-calc-command-indent-hang" | 173 | `dcl-calc-command-indent-hang'" |
| 174 | :type '(choice (const nil) function)) | 174 | :type '(choice (const nil) function)) |
| 175 | 175 | ||
| 176 | 176 | ||
| @@ -187,7 +187,7 @@ If this variable is nil, the indentation is calculated as | |||
| 187 | CUR-INDENT + EXTRA-INDENT. | 187 | CUR-INDENT + EXTRA-INDENT. |
| 188 | 188 | ||
| 189 | This package includes one function suitable for this: | 189 | This package includes one function suitable for this: |
| 190 | dcl-calc-cont-indent-relative" | 190 | `dcl-calc-cont-indent-relative'" |
| 191 | :type 'function) | 191 | :type 'function) |
| 192 | 192 | ||
| 193 | 193 | ||
| @@ -349,10 +349,10 @@ optionally followed by a comment, followed by a newline." | |||
| 349 | (list "endif" "else" dcl-label-r) | 349 | (list "endif" "else" dcl-label-r) |
| 350 | "Regexps that can trigger an electric reindent. | 350 | "Regexps that can trigger an electric reindent. |
| 351 | A list of regexps that will trigger a reindent if the last letter | 351 | A list of regexps that will trigger a reindent if the last letter |
| 352 | is defined as dcl-electric-character. | 352 | is defined as `dcl-electric-character'. |
| 353 | 353 | ||
| 354 | E.g.: if this list contains `endif', the key `f' is defined as | 354 | E.g.: if this list contains `endif', the key `f' is defined as |
| 355 | dcl-electric-character and you have just typed the `f' in | 355 | `dcl-electric-character' and you have just typed the `f' in |
| 356 | `endif', the line will be reindented." | 356 | `endif', the line will be reindented." |
| 357 | :type '(repeat regexp)) | 357 | :type '(repeat regexp)) |
| 358 | 358 | ||
| @@ -376,7 +376,7 @@ dcl-electric-character and you have just typed the `f' in | |||
| 376 | (comment-start curval) | 376 | (comment-start curval) |
| 377 | (comment-start-skip curval) | 377 | (comment-start-skip curval) |
| 378 | ) | 378 | ) |
| 379 | "Options and default values for dcl-set-option. | 379 | "Options and default values for `dcl-set-option'. |
| 380 | 380 | ||
| 381 | An alist with option variables and functions or keywords to get a | 381 | An alist with option variables and functions or keywords to get a |
| 382 | default value for the option. | 382 | default value for the option. |
| @@ -390,8 +390,8 @@ toggle the opposite of the current value (for t/nil)") | |||
| 390 | (mapcar (lambda (option-assoc) | 390 | (mapcar (lambda (option-assoc) |
| 391 | (format "%s" (car option-assoc))) | 391 | (format "%s" (car option-assoc))) |
| 392 | dcl-option-alist) | 392 | dcl-option-alist) |
| 393 | "The history list for dcl-set-option. | 393 | "The history list for `dcl-set-option'. |
| 394 | Preloaded with all known option names from dcl-option-alist") | 394 | Preloaded with all known option names from `dcl-option-alist'") |
| 395 | 395 | ||
| 396 | 396 | ||
| 397 | ;; Must be defined after dcl-cmd-r | 397 | ;; Must be defined after dcl-cmd-r |
| @@ -855,7 +855,7 @@ Returns one of the following symbols: | |||
| 855 | 855 | ||
| 856 | ;;;--------------------------------------------------------------------------- | 856 | ;;;--------------------------------------------------------------------------- |
| 857 | (defun dcl-show-line-type () | 857 | (defun dcl-show-line-type () |
| 858 | "Test dcl-get-line-type." | 858 | "Test `dcl-get-line-type'." |
| 859 | (interactive) | 859 | (interactive) |
| 860 | (let ((type (dcl-get-line-type))) | 860 | (let ((type (dcl-get-line-type))) |
| 861 | (cond | 861 | (cond |
| @@ -900,8 +900,7 @@ $ if cond | |||
| 900 | $ then | 900 | $ then |
| 901 | $ if cond | 901 | $ if cond |
| 902 | $ then | 902 | $ then |
| 903 | $ ! etc | 903 | $ ! etc" |
| 904 | " | ||
| 905 | ;; calculate indentation if it's an interesting indent-type, | 904 | ;; calculate indentation if it's an interesting indent-type, |
| 906 | ;; otherwise return nil to get the default indentation | 905 | ;; otherwise return nil to get the default indentation |
| 907 | (let ((indent)) | 906 | (let ((indent)) |
| @@ -930,8 +929,7 @@ $ xxx | |||
| 930 | 929 | ||
| 931 | If you use this function you will probably want to add \"then\" to | 930 | If you use this function you will probably want to add \"then\" to |
| 932 | dcl-electric-reindent-regexps and define the key \"n\" as | 931 | dcl-electric-reindent-regexps and define the key \"n\" as |
| 933 | dcl-electric-character. | 932 | dcl-electric-character." |
| 934 | " | ||
| 935 | (let ((case-fold-search t)) | 933 | (let ((case-fold-search t)) |
| 936 | (save-excursion | 934 | (save-excursion |
| 937 | (cond | 935 | (cond |
| @@ -974,17 +972,17 @@ see if the current lines should be indented. | |||
| 974 | Analyze the current line to see if it should be `outdented'. | 972 | Analyze the current line to see if it should be `outdented'. |
| 975 | 973 | ||
| 976 | Calculate the indentation of the current line, either with the default | 974 | Calculate the indentation of the current line, either with the default |
| 977 | method or by calling dcl-calc-command-indent-function if it is | 975 | method or by calling `dcl-calc-command-indent-function' if it is |
| 978 | non-nil. | 976 | non-nil. |
| 979 | 977 | ||
| 980 | If the current line should be outdented, calculate its indentation, | 978 | If the current line should be outdented, calculate its indentation, |
| 981 | either with the default method or by calling | 979 | either with the default method or by calling |
| 982 | dcl-calc-command-indent-function if it is non-nil. | 980 | `dcl-calc-command-indent-function' if it is non-nil. |
| 983 | 981 | ||
| 984 | 982 | ||
| 985 | Rules for default indentation: | 983 | Rules for default indentation: |
| 986 | 984 | ||
| 987 | If it is the first line in the buffer, indent dcl-margin-offset. | 985 | If it is the first line in the buffer, indent `dcl-margin-offset'. |
| 988 | 986 | ||
| 989 | Go to the previous command line with a command on it. | 987 | Go to the previous command line with a command on it. |
| 990 | Find out how much it is indented (cur-indent). | 988 | Find out how much it is indented (cur-indent). |
| @@ -992,7 +990,7 @@ Look at the first word on the line to see if the indentation should be | |||
| 992 | adjusted. Skip margin-label, continuations and comments while looking for | 990 | adjusted. Skip margin-label, continuations and comments while looking for |
| 993 | the first word. Save this buffer position as `last-point'. | 991 | the first word. Save this buffer position as `last-point'. |
| 994 | If the first word after a label is SUBROUTINE, set extra-indent to | 992 | If the first word after a label is SUBROUTINE, set extra-indent to |
| 995 | dcl-margin-offset. | 993 | `dcl-margin-offset'. |
| 996 | 994 | ||
| 997 | First word extra-indent | 995 | First word extra-indent |
| 998 | THEN +dcl-basic-offset | 996 | THEN +dcl-basic-offset |
| @@ -1149,8 +1147,7 @@ Indented lines will align with either: | |||
| 1149 | * the innermost nonclosed parenthesis | 1147 | * the innermost nonclosed parenthesis |
| 1150 | $ if ((a.eq.b .and. - | 1148 | $ if ((a.eq.b .and. - |
| 1151 | d.eq.c .or. f$function(xxxx, - | 1149 | d.eq.c .or. f$function(xxxx, - |
| 1152 | yyy))) | 1150 | yyy)))" |
| 1153 | " | ||
| 1154 | (let ((case-fold-search t) | 1151 | (let ((case-fold-search t) |
| 1155 | indent) | 1152 | indent) |
| 1156 | (save-excursion | 1153 | (save-excursion |
| @@ -1330,7 +1327,7 @@ Adjusts indentation on the current line. Data lines are not indented." | |||
| 1330 | 1327 | ||
| 1331 | ;;;------------------------------------------------------------------------- | 1328 | ;;;------------------------------------------------------------------------- |
| 1332 | (defun dcl-indent-command () | 1329 | (defun dcl-indent-command () |
| 1333 | "Indents the complete command line that point is on. | 1330 | "Indent the complete command line that point is on. |
| 1334 | This includes continuation lines." | 1331 | This includes continuation lines." |
| 1335 | (interactive "*") | 1332 | (interactive "*") |
| 1336 | (let ((type (dcl-get-line-type))) | 1333 | (let ((type (dcl-get-line-type))) |
| @@ -1377,7 +1374,7 @@ the lines indentation; otherwise insert a tab." | |||
| 1377 | 1374 | ||
| 1378 | ;;;------------------------------------------------------------------------- | 1375 | ;;;------------------------------------------------------------------------- |
| 1379 | (defun dcl-electric-character (arg) | 1376 | (defun dcl-electric-character (arg) |
| 1380 | "Inserts a character and indents if necessary. | 1377 | "Insert a character and indent if necessary. |
| 1381 | Insert a character if the user gave a numeric argument or the flag | 1378 | Insert a character if the user gave a numeric argument or the flag |
| 1382 | `dcl-electric-characters' is not set. If an argument was given, | 1379 | `dcl-electric-characters' is not set. If an argument was given, |
| 1383 | insert that many characters. | 1380 | insert that many characters. |
| @@ -1791,8 +1788,8 @@ Set or update the value of VAR in the current buffers | |||
| 1791 | 1788 | ||
| 1792 | ;;;------------------------------------------------------------------------- | 1789 | ;;;------------------------------------------------------------------------- |
| 1793 | (defun dcl-save-all-options () | 1790 | (defun dcl-save-all-options () |
| 1794 | "Save all dcl-mode options for this buffer. | 1791 | "Save all `dcl-mode' options for this buffer. |
| 1795 | Saves or updates all dcl-mode related options in a `Local Variables:' | 1792 | Saves or updates all `dcl-mode' related options in a `Local Variables:' |
| 1796 | section at the end of the current buffer." | 1793 | section at the end of the current buffer." |
| 1797 | (interactive "*") | 1794 | (interactive "*") |
| 1798 | (mapcar (lambda (option-assoc) | 1795 | (mapcar (lambda (option-assoc) |