Function: majutsu-jjsparse-mode
majutsu-jjsparse-mode is an interactive and natively compiled function
defined in majutsu-sparse.el.
Signature
(majutsu-jjsparse-mode)
Documentation
Major mode for editing .jjsparse files.
This mode provides syntax highlighting for sparse patterns and key bindings for finishing (C-c C-c) or canceling (C-c C-k) the edit.
In addition to any hooks its parent mode text-mode might have run,
this mode runs the hook majutsu-jjsparse-mode-hook, as the final or
penultimate step during initialization.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-sparse.el
(define-derived-mode majutsu-jjsparse-mode text-mode "JJ-Sparse"
"Major mode for editing .jjsparse files.
This mode provides syntax highlighting for sparse patterns and
key bindings for finishing (C-c C-c) or canceling (C-c C-k) the edit.
\\{majutsu-jjsparse-mode-map}"
:group 'majutsu
(setq-local comment-start "JJ:")
(setq-local comment-start-skip "^JJ:[ \t]*")
(setq-local comment-end "")
(setq-local comment-use-syntax nil)
;; Simple syntax highlighting
(font-lock-add-keywords nil
'(("^JJ:.*$" . font-lock-comment-face)
("^\\." . font-lock-keyword-face)
("^\\(?:[^J]\\|J[^J]\\|JJ[^:]\\).*/$" . font-lock-function-name-face)))
;; Enable with-editor-mode for C-c C-c / C-c C-k support
(when (fboundp 'with-editor-mode)
(with-editor-mode 1)))