Variable: vhdl-offsets-alist

vhdl-offsets-alist is a variable defined in vhdl-mode.el.gz.

Value

((string . -1000) (cpp-macro . -1000) (block-open . 0)
 (block-close . 0) (statement . 0)
 (statement-cont . vhdl-lineup-statement-cont)
 (statement-block-intro . +) (statement-case-intro . +)
 (case-alternative . +) (comment . vhdl-lineup-comment)
 (arglist-intro . +) (arglist-cont . 0)
 (arglist-cont-nonempty . vhdl-lineup-arglist)
 (arglist-close . vhdl-lineup-arglist) (entity . 0)
 (configuration . 0) (package . 0) (architecture . 0)
 (package-body . 0) (context . 0) (directive . 0))

Documentation

Association list of syntactic element symbols and indentation offsets.

As described below, each cons cell in this list has the form:

    (SYNTACTIC-SYMBOL . OFFSET)

When a line is indented, vhdl-mode first determines the syntactic context of the line by generating a list of symbols called syntactic elements. This list can contain more than one syntactic element and the global variable vhdl-syntactic-context contains the context list for the line being indented. Each element in this list is actually a cons cell of the syntactic symbol and a buffer position. This buffer position is call the relative indent point for the line. Some syntactic symbols may not have a relative indent point associated with them.

After the syntactic context list for a line is generated, vhdl-mode calculates the absolute indentation for the line by looking at each syntactic element in the list. First, it compares the syntactic element against the SYNTACTIC-SYMBOL's in vhdl-offsets-alist. When it finds a match, it adds the OFFSET to the column of the relative indent point. The sum of this calculation for each element in the syntactic list is the absolute offset for line being indented.

If the syntactic element does not match any in the vhdl-offsets-alist, an error is generated if vhdl-strict-syntax-p is non-nil, otherwise the element is ignored.

Actually, OFFSET can be an integer, a function, a variable, or one of the following symbols: +, -, ++, or --. These latter designate positive or negative multiples of vhdl-basic-offset, respectively: *1, *-1, *2, and *-2. If OFFSET is a function, it is called with a single argument containing the cons of the syntactic element symbol and the relative indent point. The function should return an integer offset.

Here is the current list of valid syntactic element symbols:

 string -- inside multi-line string
 block-open -- statement block open
 block-close -- statement block close
 statement -- a VHDL statement
 statement-cont -- a continuation of a VHDL statement
 statement-block-intro -- the first line in a new statement block
 statement-case-intro -- the first line in a case alternative block
 case-alternative -- a case statement alternative clause
 comment -- a line containing only a comment
 arglist-intro -- the first line in an argument list
 arglist-cont -- subsequent argument list lines when no
                           arguments follow on the same line as
                           the arglist opening paren
 arglist-cont-nonempty -- subsequent argument list lines when at
                           least one argument follows on the same
                           line as the arglist opening paren
 arglist-close -- the solo close paren of an argument list
 entity -- inside an entity declaration
 configuration -- inside a configuration declaration
 package -- inside a package declaration
 architecture -- inside an architecture body
 package-body -- inside a package body
 context -- inside a context declaration

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defvar vhdl-offsets-alist (copy-alist vhdl-offsets-alist-default)
  "Association list of syntactic element symbols and indentation offsets.
As described below, each cons cell in this list has the form:

    (SYNTACTIC-SYMBOL . OFFSET)

When a line is indented, `vhdl-mode' first determines the syntactic
context of the line by generating a list of symbols called syntactic
elements.  This list can contain more than one syntactic element and
the global variable `vhdl-syntactic-context' contains the context list
for the line being indented.  Each element in this list is actually a
cons cell of the syntactic symbol and a buffer position.  This buffer
position is call the relative indent point for the line.  Some
syntactic symbols may not have a relative indent point associated with
them.

After the syntactic context list for a line is generated, `vhdl-mode'
calculates the absolute indentation for the line by looking at each
syntactic element in the list.  First, it compares the syntactic
element against the SYNTACTIC-SYMBOL's in `vhdl-offsets-alist'.  When it
finds a match, it adds the OFFSET to the column of the relative indent
point.  The sum of this calculation for each element in the syntactic
list is the absolute offset for line being indented.

If the syntactic element does not match any in the `vhdl-offsets-alist',
an error is generated if `vhdl-strict-syntax-p' is non-nil, otherwise
the element is ignored.

Actually, OFFSET can be an integer, a function, a variable, or one of
the following symbols: `+', `-', `++', or `--'.  These latter
designate positive or negative multiples of `vhdl-basic-offset',
respectively: *1, *-1, *2, and *-2.  If OFFSET is a function, it is
called with a single argument containing the cons of the syntactic
element symbol and the relative indent point.  The function should
return an integer offset.

Here is the current list of valid syntactic element symbols:

 string                 -- inside multi-line string
 block-open             -- statement block open
 block-close            -- statement block close
 statement              -- a VHDL statement
 statement-cont         -- a continuation of a VHDL statement
 statement-block-intro  -- the first line in a new statement block
 statement-case-intro   -- the first line in a case alternative block
 case-alternative       -- a case statement alternative clause
 comment                -- a line containing only a comment
 arglist-intro          -- the first line in an argument list
 arglist-cont           -- subsequent argument list lines when no
                           arguments follow on the same line as
                           the arglist opening paren
 arglist-cont-nonempty  -- subsequent argument list lines when at
                           least one argument follows on the same
                           line as the arglist opening paren
 arglist-close          -- the solo close paren of an argument list
 entity                 -- inside an entity declaration
 configuration          -- inside a configuration declaration
 package                -- inside a package declaration
 architecture           -- inside an architecture body
 package-body           -- inside a package body
 context                -- inside a context declaration")