aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-02-26 17:05:18 +0100
committerStefan Kangas2021-02-26 17:11:49 +0100
commite95b3e4d1d7372beb576b2a12f80d331742e4f7d (patch)
tree65451d789d66568b0529143c81ed41df7ea086de
parentffdb0a2d8e64980d63b7c1c6c71ac6e2d26b4fb2 (diff)
downloademacs-e95b3e4d1d7372beb576b2a12f80d331742e4f7d.tar.gz
emacs-e95b3e4d1d7372beb576b2a12f80d331742e4f7d.zip
* lisp/progmodes/dcl-mode.el: Minor doc fixes.
-rw-r--r--lisp/progmodes/dcl-mode.el51
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.
95A block is the commands between THEN-ELSE-ENDIF and between the commands 95A block is the commands between THEN-ELSE-ENDIF and between the commands
96dcl-block-begin-regexp and dcl-block-end-regexp. 96`dcl-block-begin-regexp' and `dcl-block-end-regexp'.
97 97
98The meaning of this variable may be changed if 98The meaning of this variable may be changed if
99dcl-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."
105A continuation line is a line that follows a line ending with `-'. 105A continuation line is a line that follows a line ending with `-'.
106 106
107The meaning of this variable may be changed if 107The meaning of this variable may be changed if
108dcl-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.
123A margin label is a label that doesn't begin or end a block, i.e. it 123A margin label is a label that doesn't begin or end a block, i.e. it
124doesn't match dcl-block-begin-regexp or dcl-block-end-regexp." 124doesn'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
169CUR-INDENT + EXTRA-INDENT. 169CUR-INDENT + EXTRA-INDENT.
170 170
171This package includes two functions suitable for this: 171This 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
187CUR-INDENT + EXTRA-INDENT. 187CUR-INDENT + EXTRA-INDENT.
188 188
189This package includes one function suitable for this: 189This 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.
351A list of regexps that will trigger a reindent if the last letter 351A list of regexps that will trigger a reindent if the last letter
352is defined as dcl-electric-character. 352is defined as `dcl-electric-character'.
353 353
354E.g.: if this list contains `endif', the key `f' is defined as 354E.g.: if this list contains `endif', the key `f' is defined as
355dcl-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
381An alist with option variables and functions or keywords to get a 381An alist with option variables and functions or keywords to get a
382default value for the option. 382default 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'.
394Preloaded with all known option names from dcl-option-alist") 394Preloaded 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
931If you use this function you will probably want to add \"then\" to 930If you use this function you will probably want to add \"then\" to
932dcl-electric-reindent-regexps and define the key \"n\" as 931dcl-electric-reindent-regexps and define the key \"n\" as
933dcl-electric-character. 932dcl-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.
974Analyze the current line to see if it should be `outdented'. 972Analyze the current line to see if it should be `outdented'.
975 973
976Calculate the indentation of the current line, either with the default 974Calculate the indentation of the current line, either with the default
977method or by calling dcl-calc-command-indent-function if it is 975method or by calling `dcl-calc-command-indent-function' if it is
978non-nil. 976non-nil.
979 977
980If the current line should be outdented, calculate its indentation, 978If the current line should be outdented, calculate its indentation,
981either with the default method or by calling 979either with the default method or by calling
982dcl-calc-command-indent-function if it is non-nil. 980`dcl-calc-command-indent-function' if it is non-nil.
983 981
984 982
985Rules for default indentation: 983Rules for default indentation:
986 984
987If it is the first line in the buffer, indent dcl-margin-offset. 985If it is the first line in the buffer, indent `dcl-margin-offset'.
988 986
989Go to the previous command line with a command on it. 987Go to the previous command line with a command on it.
990Find out how much it is indented (cur-indent). 988Find 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
992adjusted. Skip margin-label, continuations and comments while looking for 990adjusted. Skip margin-label, continuations and comments while looking for
993the first word. Save this buffer position as `last-point'. 991the first word. Save this buffer position as `last-point'.
994If the first word after a label is SUBROUTINE, set extra-indent to 992If the first word after a label is SUBROUTINE, set extra-indent to
995dcl-margin-offset. 993`dcl-margin-offset'.
996 994
997First word extra-indent 995First word extra-indent
998THEN +dcl-basic-offset 996THEN +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.
1334This includes continuation lines." 1331This 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.
1381Insert a character if the user gave a numeric argument or the flag 1378Insert 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,
1383insert that many characters. 1380insert 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.
1795Saves or updates all dcl-mode related options in a `Local Variables:' 1792Saves or updates all `dcl-mode' related options in a `Local Variables:'
1796section at the end of the current buffer." 1793section at the end of the current buffer."
1797 (interactive "*") 1794 (interactive "*")
1798 (mapcar (lambda (option-assoc) 1795 (mapcar (lambda (option-assoc)