Function: opascal-mode
opascal-mode is an autoloaded, interactive and byte-compiled function
defined in opascal.el.gz.
Signature
(opascal-mode)
Documentation
Major mode for editing OPascal code.
C-c u (opascal-find-unit) - Search for a OPascal source file.
M-q (opascal-fill-comment) - Fill the current comment.
M-x opascal-new-comment-line (opascal-new-comment-line) - If in a // comment, do a new comment line.
C-M-\ (indent-region) also works for indenting a whole region.
Customization:
opascal-indent-level (default 3)
Indentation of OPascal statements with respect to containing block.
opascal-compound-block-indent (default 0)
Extra indentation for blocks in compound statements.
opascal-case-label-indent (default 0)
Extra indentation for case statement labels.
opascal-search-path (default .)
Directories to search when finding external units.
opascal-verbose (default nil)
If true then OPascal token processing progress is reported to the user.
Coloring:
opascal-keyword-face (default font-lock-keyword-face)
Face used to color OPascal keywords.
In addition to any hooks its parent mode prog-mode might have run,
this mode runs the hook opascal-mode-hook, as the final or penultimate
step during initialization.
Key Bindings
Aliases
delphi-mode (obsolete since 24.4)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/opascal.el.gz
;;;###autoload
(define-derived-mode opascal-mode prog-mode "OPascal"
"Major mode for editing OPascal code.
\\<opascal-mode-map>
\\[opascal-find-unit]\t- Search for a OPascal source file.
\\[opascal-fill-comment]\t- Fill the current comment.
\\[opascal-new-comment-line]\t- If in a // comment, do a new comment line.
\\[indent-region] also works for indenting a whole region.
Customization:
`opascal-indent-level' (default 3)
Indentation of OPascal statements with respect to containing block.
`opascal-compound-block-indent' (default 0)
Extra indentation for blocks in compound statements.
`opascal-case-label-indent' (default 0)
Extra indentation for case statement labels.
`opascal-search-path' (default .)
Directories to search when finding external units.
`opascal-verbose' (default nil)
If true then OPascal token processing progress is reported to the user.
Coloring:
`opascal-keyword-face' (default `font-lock-keyword-face')
Face used to color OPascal keywords."
;; Buffer locals:
(setq-local indent-line-function #'opascal-indent-line)
(setq-local comment-indent-function #'opascal-indent-line)
(setq-local case-fold-search t)
(setq-local opascal-progress-last-reported-point nil)
(setq-local font-lock-defaults opascal-font-lock-defaults)
(setq-local tab-always-indent opascal-tab-always-indents)
(setq-local syntax-propertize-function opascal--syntax-propertize)
(setq-local comment-start "// ")
(setq-local comment-start-skip "\\(?://\\|(\\*\\|{\\)[ \t]*")
(setq-local comment-end-skip "[ \t]*\\(?:\n\\|\\*)\\|}\\)"))