Function: icon-mode
icon-mode is an autoloaded, interactive and byte-compiled function
defined in icon.el.gz.
Signature
(icon-mode)
Documentation
Major mode for editing Icon code.
Expression and list commands understand all Icon brackets.
Tab indents for Icon code.
Paragraphs are separated by blank lines only.
Delete converts tabs to spaces as it moves back.
C-M-a beginning-of-icon-defun
C-M-e end-of-icon-defun
C-M-h mark-icon-function
C-M-q indent-icon-exp
DEL backward-delete-char-untabify
{ electric-icon-brace
} electric-icon-brace
Variables controlling indentation style:
icon-tab-always-indent
Non-nil means TAB in Icon mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.
icon-auto-newline
Non-nil means automatically newline before and after braces
inserted in Icon code.
icon-indent-level
Indentation of Icon statements within surrounding block.
The surrounding block's indentation is the indentation
of the line on which the open-brace appears.
icon-continued-statement-offset
Extra indentation given to a substatement, such as the
then-clause of an if or body of a while.
icon-continued-brace-offset
Extra indentation given to a brace that starts a substatement.
This is in addition to icon-continued-statement-offset.
icon-brace-offset
Extra indentation for line if it starts with an open brace.
icon-brace-imaginary-offset
An open brace following other text is treated as if it were
this far to the right of the start of its line.
Turning on Icon mode calls the value of the variable icon-mode-hook
with no args, if that value is non-nil.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/icon.el.gz
;;;###autoload
(define-derived-mode icon-mode prog-mode "Icon"
"Major mode for editing Icon code.
Expression and list commands understand all Icon brackets.
Tab indents for Icon code.
Paragraphs are separated by blank lines only.
Delete converts tabs to spaces as it moves back.
\\{icon-mode-map}
Variables controlling indentation style:
icon-tab-always-indent
Non-nil means TAB in Icon mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.
icon-auto-newline
Non-nil means automatically newline before and after braces
inserted in Icon code.
icon-indent-level
Indentation of Icon statements within surrounding block.
The surrounding block's indentation is the indentation
of the line on which the open-brace appears.
icon-continued-statement-offset
Extra indentation given to a substatement, such as the
then-clause of an if or body of a while.
icon-continued-brace-offset
Extra indentation given to a brace that starts a substatement.
This is in addition to `icon-continued-statement-offset'.
icon-brace-offset
Extra indentation for line if it starts with an open brace.
icon-brace-imaginary-offset
An open brace following other text is treated as if it were
this far to the right of the start of its line.
Turning on Icon mode calls the value of the variable `icon-mode-hook'
with no args, if that value is non-nil."
:abbrev-table icon-mode-abbrev-table
(setq-local paragraph-start (concat "$\\|" page-delimiter))
(setq-local paragraph-separate paragraph-start)
(setq-local indent-line-function #'icon-indent-line)
(setq-local comment-start "# ")
(setq-local comment-end "")
(setq-local comment-start-skip "# *")
(setq-local comment-indent-function 'icon-comment-indent)
(setq-local indent-line-function 'icon-indent-line)
;; font-lock support
(setq-local font-lock-defaults
'((icon-font-lock-keywords
icon-font-lock-keywords-1 icon-font-lock-keywords-2)
nil nil ((?_ . "w")) beginning-of-defun
(font-lock-mark-block-function . mark-defun)))
;; imenu support
(setq-local imenu-generic-expression icon-imenu-generic-expression)
;; hideshow support
(setq-local hs-block-start-regexp "\\<procedure\\>")
(setq-local hs-block-end-regexp "\\<end\\>")
(setq-local hs-forward-sexp-function #'icon-forward-sexp-function))