Function: simula-mode

simula-mode is an autoloaded, interactive and byte-compiled function defined in simula.el.gz.

Signature

(simula-mode)

Documentation

Major mode for editing SIMULA code.

: simula-electric-label
C-M-q simula-indent-exp
C-c C-d simula-forward-down-level
C-c C-n simula-next-statement
C-c C-p simula-previous-statement
C-c C-u simula-backward-up-level
DEL backward-delete-char-untabify
Variables controlling indentation style:
 simula-indent-level
    Indentation of SIMULA statements with respect to containing block.
 simula-substatement-offset
    Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.
 simula-continued-statement-offset 3
    Extra indentation for lines not starting a statement or substatement,
    e.g. a nested FOR-loop. If value is a list, each line in a multiple-
    line continued statement will have the car of the list extra indentation
    with respect to the previous line of the statement.
 simula-label-offset -4711
    Offset of SIMULA label lines relative to usual indentation.
 simula-if-indent (0 . 0)
    Extra indentation of THEN and ELSE with respect to the starting IF.
    Value is a cons cell, the car is extra THEN indentation and the cdr
    extra ELSE indentation. IF after ELSE is indented as the starting IF.
 simula-inspect-indent (0 . 0)
    Extra indentation of WHEN and OTHERWISE with respect to the
    corresponding INSPECT. Value is a cons cell, the car is
    extra WHEN indentation and the cdr extra OTHERWISE indentation.
 simula-electric-indent nil
    If this variable is non-nil, simula-indent-line
    will check the previous line to see if it has to be reindented.
 simula-abbrev-keyword upcase
    Determine how SIMULA keywords will be expanded. Value is one of
    the symbols upcase, downcase, capitalize, (as in) abbrev-table,
    or nil if they should not be changed.
 simula-abbrev-stdproc abbrev-table
    Determine how standard SIMULA procedure and class names will be
    expanded. Value is one of the symbols upcase, downcase, capitalize,
    (as in) abbrev-table, or nil if they should not be changed.

Turning on SIMULA mode calls the value of the variable simula-mode-hook with no arguments, if that value is non-nil.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/simula.el.gz
;;;###autoload
(define-derived-mode simula-mode prog-mode "Simula"
  "Major mode for editing SIMULA code.
\\{simula-mode-map}
Variables controlling indentation style:
 `simula-indent-level'
    Indentation of SIMULA statements with respect to containing block.
 `simula-substatement-offset'
    Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.
 `simula-continued-statement-offset' 3
    Extra indentation for lines not starting a statement or substatement,
    e.g. a nested FOR-loop.  If value is a list, each line in a multiple-
    line continued statement will have the car of the list extra indentation
    with respect to the previous line of the statement.
 `simula-label-offset' -4711
    Offset of SIMULA label lines relative to usual indentation.
 `simula-if-indent' (0 . 0)
    Extra indentation of THEN and ELSE with respect to the starting IF.
    Value is a cons cell, the car is extra THEN indentation and the cdr
    extra ELSE indentation.  IF after ELSE is indented as the starting IF.
 `simula-inspect-indent' (0 . 0)
    Extra indentation of WHEN and OTHERWISE with respect to the
    corresponding INSPECT.  Value is a cons cell, the car is
    extra WHEN indentation and the cdr extra OTHERWISE indentation.
 `simula-electric-indent' nil
    If this variable is non-nil, `simula-indent-line'
    will check the previous line to see if it has to be reindented.
 `simula-abbrev-keyword' `upcase'
    Determine how SIMULA keywords will be expanded.  Value is one of
    the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table',
    or nil if they should not be changed.
 `simula-abbrev-stdproc' `abbrev-table'
    Determine how standard SIMULA procedure and class names will be
    expanded.  Value is one of the symbols `upcase', `downcase', `capitalize',
    (as in) `abbrev-table', or nil if they should not be changed.

Turning on SIMULA mode calls the value of the variable simula-mode-hook
with no arguments, if that value is non-nil."
  (setq-local comment-column 40)
  ;; (setq-local end-comment-column 75)
  (setq-local paragraph-start "[ \t]*$\\|\f")
  (setq-local paragraph-separate paragraph-start)
  (setq-local indent-line-function #'simula-indent-line)
  (setq-local comment-start "! ")
  (setq-local comment-end " ;")
  (setq-local comment-start-skip "!+ *")
  (setq-local parse-sexp-ignore-comments nil)
  (setq-local comment-multi-line t)
  (setq-local font-lock-defaults
              '((simula-font-lock-keywords simula-font-lock-keywords-1
                 simula-font-lock-keywords-2 simula-font-lock-keywords-3)
                nil t ((?_ . "w"))))
  (setq-local syntax-propertize-function
              simula-syntax-propertize-function)
  (abbrev-mode 1))