* lisp/progmodes/dcl-mode.el: Minor doc fixes.

This commit is contained in:
Stefan Kangas 2021-02-26 17:05:18 +01:00
parent ffdb0a2d8e
commit e95b3e4d1d

View file

@ -93,10 +93,10 @@ Presently this includes some syntax, .OP.erators, and \"f$\" lexicals.")
(defcustom dcl-basic-offset 4
"Number of columns to indent a block in DCL.
A block is the commands between THEN-ELSE-ENDIF and between the commands
dcl-block-begin-regexp and dcl-block-end-regexp.
`dcl-block-begin-regexp' and `dcl-block-end-regexp'.
The meaning of this variable may be changed if
dcl-calc-command-indent-function is set to a function."
`dcl-calc-command-indent-function' is set to a function."
:type 'integer)
@ -105,7 +105,7 @@ dcl-calc-command-indent-function is set to a function."
A continuation line is a line that follows a line ending with `-'.
The meaning of this variable may be changed if
dcl-calc-cont-indent-function is set to a function."
`dcl-calc-cont-indent-function' is set to a function."
:type 'integer)
@ -121,7 +121,7 @@ A command line is a line that starts with `$'."
(defcustom dcl-margin-label-offset 2
"Number of columns to indent a margin label in DCL.
A margin label is a label that doesn't begin or end a block, i.e. it
doesn't match dcl-block-begin-regexp or dcl-block-end-regexp."
doesn't match `dcl-block-begin-regexp' or `dcl-block-end-regexp'."
:type 'integer)
@ -169,8 +169,8 @@ If this variable is nil, the indentation is calculated as
CUR-INDENT + EXTRA-INDENT.
This package includes two functions suitable for this:
dcl-calc-command-indent-multiple
dcl-calc-command-indent-hang"
`dcl-calc-command-indent-multiple'
`dcl-calc-command-indent-hang'"
:type '(choice (const nil) function))
@ -187,7 +187,7 @@ If this variable is nil, the indentation is calculated as
CUR-INDENT + EXTRA-INDENT.
This package includes one function suitable for this:
dcl-calc-cont-indent-relative"
`dcl-calc-cont-indent-relative'"
:type 'function)
@ -349,10 +349,10 @@ optionally followed by a comment, followed by a newline."
(list "endif" "else" dcl-label-r)
"Regexps that can trigger an electric reindent.
A list of regexps that will trigger a reindent if the last letter
is defined as dcl-electric-character.
is defined as `dcl-electric-character'.
E.g.: if this list contains `endif', the key `f' is defined as
dcl-electric-character and you have just typed the `f' in
`dcl-electric-character' and you have just typed the `f' in
`endif', the line will be reindented."
:type '(repeat regexp))
@ -376,7 +376,7 @@ dcl-electric-character and you have just typed the `f' in
(comment-start curval)
(comment-start-skip curval)
)
"Options and default values for dcl-set-option.
"Options and default values for `dcl-set-option'.
An alist with option variables and functions or keywords to get a
default value for the option.
@ -390,8 +390,8 @@ toggle the opposite of the current value (for t/nil)")
(mapcar (lambda (option-assoc)
(format "%s" (car option-assoc)))
dcl-option-alist)
"The history list for dcl-set-option.
Preloaded with all known option names from dcl-option-alist")
"The history list for `dcl-set-option'.
Preloaded with all known option names from `dcl-option-alist'")
;; Must be defined after dcl-cmd-r
@ -855,7 +855,7 @@ Returns one of the following symbols:
;;;---------------------------------------------------------------------------
(defun dcl-show-line-type ()
"Test dcl-get-line-type."
"Test `dcl-get-line-type'."
(interactive)
(let ((type (dcl-get-line-type)))
(cond
@ -900,8 +900,7 @@ $ if cond
$ then
$ if cond
$ then
$ ! etc
"
$ ! etc"
;; calculate indentation if it's an interesting indent-type,
;; otherwise return nil to get the default indentation
(let ((indent))
@ -930,8 +929,7 @@ $ xxx
If you use this function you will probably want to add \"then\" to
dcl-electric-reindent-regexps and define the key \"n\" as
dcl-electric-character.
"
dcl-electric-character."
(let ((case-fold-search t))
(save-excursion
(cond
@ -974,17 +972,17 @@ see if the current lines should be indented.
Analyze the current line to see if it should be `outdented'.
Calculate the indentation of the current line, either with the default
method or by calling dcl-calc-command-indent-function if it is
method or by calling `dcl-calc-command-indent-function' if it is
non-nil.
If the current line should be outdented, calculate its indentation,
either with the default method or by calling
dcl-calc-command-indent-function if it is non-nil.
`dcl-calc-command-indent-function' if it is non-nil.
Rules for default indentation:
If it is the first line in the buffer, indent dcl-margin-offset.
If it is the first line in the buffer, indent `dcl-margin-offset'.
Go to the previous command line with a command on it.
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
adjusted. Skip margin-label, continuations and comments while looking for
the first word. Save this buffer position as `last-point'.
If the first word after a label is SUBROUTINE, set extra-indent to
dcl-margin-offset.
`dcl-margin-offset'.
First word extra-indent
THEN +dcl-basic-offset
@ -1149,8 +1147,7 @@ Indented lines will align with either:
* the innermost nonclosed parenthesis
$ if ((a.eq.b .and. -
d.eq.c .or. f$function(xxxx, -
yyy)))
"
yyy)))"
(let ((case-fold-search t)
indent)
(save-excursion
@ -1330,7 +1327,7 @@ Adjusts indentation on the current line. Data lines are not indented."
;;;-------------------------------------------------------------------------
(defun dcl-indent-command ()
"Indents the complete command line that point is on.
"Indent the complete command line that point is on.
This includes continuation lines."
(interactive "*")
(let ((type (dcl-get-line-type)))
@ -1377,7 +1374,7 @@ the lines indentation; otherwise insert a tab."
;;;-------------------------------------------------------------------------
(defun dcl-electric-character (arg)
"Inserts a character and indents if necessary.
"Insert a character and indent if necessary.
Insert a character if the user gave a numeric argument or the flag
`dcl-electric-characters' is not set. If an argument was given,
insert that many characters.
@ -1791,8 +1788,8 @@ Set or update the value of VAR in the current buffers
;;;-------------------------------------------------------------------------
(defun dcl-save-all-options ()
"Save all dcl-mode options for this buffer.
Saves or updates all dcl-mode related options in a `Local Variables:'
"Save all `dcl-mode' options for this buffer.
Saves or updates all `dcl-mode' related options in a `Local Variables:'
section at the end of the current buffer."
(interactive "*")
(mapcar (lambda (option-assoc)