ほんとのこと知りたいだけなのに。

夏休みはもうおわり。

Emacs Lisp のモード関連のオペレータ

メジャーモード書いていとメジャーモードに関する情報が少なく感じる。

断片的なものは多いが、こんなオペレータ無いかな。というので探すことがるので一覧にしてみた。

22 Major and Minor Modes

22.1 Hooks

22.1.1 Running Hooks

type Statement
Function run-hook-with-args hook &rest args
Function run-hook-with-args-until-failure hook &rest args
Function run-hook-with-args-until-success hook &rest args

22.1.2 Setting Hooks

type Statement
Function add-hook hook function &optional append local
Function remove-hook hook function &optional local

22.2 Major Modes

type Statement
Command fundamental-mode
User Option major-mode

22.2.1 Major Mode Conventions

なし

22.2.2 How Emacs Chooses a Major Mode

type Statement
Command normal-mode &optional find-file
Function set-auto-mode &optional keep-mode-if-same
Function set-buffer-major-mode buffer
User Option initial-major-mode
Variable interpreter-mode-alist
Variable magic-mode-alist
Variable magic-fallback-mode-alist
Variable auto-mode-alist

22.2.3 Getting Help about a Major Mode

type Statement
Command describe-mode &optional buffer

22.2.4 Defining Derived Modes

type Statement
Macro define-derived-mode variant parent name docstring keyword-args... body...
Function derived-mode-p &rest modes

22.2.5 Basic Major Modes

type Statement
Command text-mode
Command prog-mode
Command special-mode

22.2.6 Mode Hooks

type Statement
Function run-mode-hooks &rest hookvars
Macro delay-mode-hooks body...
Variable change-major-mode-after-body-hook
Variable after-change-major-mode-hook

22.2.7 Tabulated List mode

type Statement
Variable tabulated-list-format
Variable tabulated-list-entries
Variable tabulated-list-revert-hook
Variable tabulated-list-printer
Variable tabulated-list-sort-key
Function tabulated-list-init-header
Function tabulated-list-print &optional remember-pos update

22.2.8 Generic Modes

type Statement
Macro define-generic-mode mode comment-list keyword-list font-lock-list auto-mode-list function-list &optional docstring

22.2.9 Major Mode Examples

なし

22.3 Minor Modes

type Statement
Variable minor-mode-list

22.3.1 Conventions for Writing Minor Modes

なし

22.3.2 Keymaps and Minor Modes

なし

22.3.3 Defining Minor Modes

type Statement
Macro define-minor-mode mode doc [init-value [lighter [keymap]]] keyword-args... body...
Macro define-globalized-minor-mode global-mode mode turn-on keyword-args...

22.4 Mode Line Format

なし

22.4.1 Mode Line Basics

type Statement
Function force-mode-line-update &optional all

22.4.2 The Data Structure of the Mode Line

なし

22.4.3 The Top Level of Mode Line Control

type Statement
User Option mode-line-format

22.4.4 Variables Used in the Mode Line

type Statement
Variable mode-line-mule-info
Variable mode-line-modified
Variable mode-line-frame-identification
Variable mode-line-buffer-identification
Variable mode-line-position
Variable vc-mode
Variable mode-line-modes
Variable mode-line-remote
Variable mode-line-client
Variable mode-name
Variable mode-line-process
Variable mode-line-front-space
Variable mode-line-end-spaces
Variable mode-line-misc-info
Variable minor-mode-alist
Variable global-mode-string

22.4.5 %-Constructs in the Mode Line

なし

22.4.6 Properties in the Mode Line

なし

22.4.7 Window Header Lines

type Statement
Variable header-line-format
Function window-header-line-height &optional window

22.4.8 Emulating Mode Line Formatting

type Statement
Function format-mode-line format &optional face window buffer

22.5 Imenu

type Statement
Command imenu-add-to-menubar name
Variable imenu-generic-expression
Variable imenu-case-fold-search
Variable imenu-syntax-alist
Variable imenu-prev-index-position-function
Variable imenu-extract-index-name-function
Variable imenu-extract-index-name-function
Variable imenu-create-index-function

22.6 Font Lock Mode

22.6.1 Font Lock Basics

type Statement
Variable font-lock-defaults

22.6.2 Search-based Fontification

type Statement
Variable font-lock-keywords
Variable font-lock-keywords-case-fold-search

22.6.3 Customizing Search-Based Fontification

type Statement
Function font-lock-add-keywords mode keywords &optional how
Function font-lock-remove-keywords mode keywords

22.6.4 Other Font Lock Variables

type Statement
Variable font-lock-mark-block-function
Variable font-lock-extra-managed-props
Variable font-lock-fontify-buffer-function
Variable font-lock-unfontify-buffer-function
Variable font-lock-fontify-region-function
Variable font-lock-unfontify-region-function
Variable font-lock-flush-function
Variable font-lock-ensure-function
Function jit-lock-register function &optional contextual
Function jit-lock-unregister function

22.6.5 Levels of Font Lock

なし

22.6.6 Precalculated Fontification

なし

22.6.7 Faces for Font Lock

なし

22.6.8 Syntactic Font Lock

type Statement
Variable font-lock-keywords-only
Variable font-lock-syntax-table
Variable font-lock-syntactic-face-function

22.6.9 Multiline Font Lock Constructs

22.6.9.1 Font Lock Multiline
type Statement
Variable font-lock-multiline
22.6.9.2 Region to Fontify after a Buffer Change
type Statement
Variable font-lock-extend-after-change-region-function

22.7 Automatic Indentation of code

22.7.1 Simple Minded Indentation Engine

22.7.1.1 SMIE Setup and Features
type Statement
Function smie-setup grammar rules-function &rest keywords
Command smie-close-block
Command smie-down-list &optional arg
22.7.1.2 Operator Precedence Grammars
type Statement
Function smie-prec2->grammar table
Function smie-merge-prec2s &rest tables
Function smie-precs->prec2 precs
Function smie-bnf->prec2 bnf &rest resolvers
22.7.1.3 Defining the Grammar of a Language

なし

22.7.1.4 Defining Tokens

なし

22.7.1.5 Living With a Weak Parser

なし

22.7.1.6 Specifying Indentation Rules

なし

22.7.1.7 Helper Functions for Indentation Rules
type Statement
Function smie-rule-bolp
Function smie-rule-hanging-p
Function smie-rule-next-p &rest tokens
Function smie-rule-prev-p &rest tokens
Function smie-rule-parent-p &rest parents
Function smie-rule-sibling-p
Function smie-rule-parent &optional offset
Function smie-rule-separator method
22.7.1.8 Sample Indentation Rules

なし

22.7.1.9 Customizing Indentation
type Statement
User Option smie-config
Command smie-config-guess
Command smie-config-save
Command smie-config-show-indent &optional move
Command smie-config-set-indent
Function smie-config-local rules

22.8 Desktop Save Mode

type Statement
Variable desktop-save-buffer
Variable desktop-buffer-mode-handlers

おわり

ここも結構多いことがわかる。

それだれ複雑かつ中心の機能ということなんでしょうね。