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

夏休みはもうおわり。

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

おわり

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

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

Emacs Lisp のポジション関連のオペレータ

ナローイングに興味が出たのでオペレータの一覧を作成してみた。

29 Positions

29.1 Point

Type Statement
Function point
Function point-min
Function point-max
Function buffer-end flag
Function buffer-size &optional buffer

29.2 Motion

29.2.1 Motion by Characters

Type Statement
Command goto-char position
Command forward-char &optional count
Command backward-char &optional count

29.2.2 Motion by Words

Type Statement
Command forward-word &optional count
Command backward-word &optional count
User Option words-include-escapes
Variable inhibit-field-text-motion
Variable find-word-boundary-function-table
Function forward-word-strictly &optional count
Function backward-word-strictly &optional count

29.2.3 Motion to an End of the Buffer

Type Statement
Command beginning-of-buffer &optional n
Command end-of-buffer &optional n

29.2.4 Motion by Text Lines

Type Statement
Command beginning-of-line &optional count
Function line-beginning-position &optional count
Command end-of-line &optional count
Function line-end-position &optional count
Command forward-line &optional count
Function count-lines start end
Command count-words start end
Function line-number-at-pos &optional pos

29.2.5 Motion by Screen Lines

Type Statement
Function vertical-motion count &optional window cur-col
Function count-screen-lines &optional beg end count-final-newline window
Command move-to-window-line count
Function move-to-window-group-line count
Function compute-motion from frompos to topos width offsets window

29.2.6 Moving over Balanced Expressions

Type Statement
Command forward-list &optional arg
Command backward-list &optional arg
Command up-list &optional arg escape-strings no-syntax-crossing
Command backward-up-list &optional arg escape-strings no-syntax-crossing
Command down-list &optional arg
Command forward-sexp &optional arg
Command backward-sexp &optional arg
Command beginning-of-defun &optional arg
Command end-of-defun &optional arg
User Option defun-prompt-regexp
User Option open-paren-in-column-0-is-defun-start
Variable beginning-of-defun-function
Variable end-of-defun-function

29.2.7 Skipping Characters

Type Statement
Function skip-chars-forward character-set &optional limit
Function skip-chars-backward character-set &optional limit

29.2.6 Moving over Balanced Expressions

Type Statement
Command backward-list &optional arg
Command up-list &optional arg escape-strings no-syntax-crossing
Command backward-up-list &optional arg escape-strings no-syntax-crossing
Command down-list &optional arg
Command forward-sexp &optional arg
Command backward-sexp &optional arg
Command beginning-of-defun &optional arg
Command end-of-defun &optional arg
User Option defun-prompt-regexp
User Option open-paren-in-column-0-is-defun-start
Variable beginning-of-defun-function
Variable end-of-defun-function

29.2.7 Skipping Characters

Type Statement
Function skip-chars-forward character-set &optional limit
Function skip-chars-backward character-set &optional limit

29.3 Excursions

Type Statement
Special Form save-excursion body...
Macro save-mark-and-excursion body...

29.4 Narrowing

Type Statement
Command narrow-to-region start end
Command narrow-to-page &optional move-count
Command widen
Function buffer-narrowed-p
Special Form save-restriction body...

おわり

しかし「ポジション」ってなんやろ。

Emacs Lisp のテキスト関連のオペレータ

メジャーモードでバッファに文字列を出力する方法がわからなくてテキスト関連のオペレータを一覧にします。

31 Text

31.1 Examining Text Near Point

type statement
Function char-after &optional position
Function char-before &optional position
Function following-char
Function preceding-char
Function bobp
Function eobp
Function bolp
Function eolp

31.2 Examining Buffer Contents

type statement
Function buffer-substring start end
Function buffer-substring-no-properties start end
Function buffer-string
Function filter-buffer-substring start end &optional delete
Variable filter-buffer-substring-function
Variable filter-buffer-substring-functions
Variable buffer-substring-filters
Function current-word &optional strict really-word
Function thing-at-point thing &optional no-properties

31.3 Comparing Text

type statement
Function compare-buffer-substrings buffer1 start1 end1 buffer2 start2 end2

31.4 Inserting Text

type statement
Function insert &rest args
Function insert-before-markers &rest args
Command insert-char character &optional count inherit
Function insert-buffer-substring from-buffer-or-name &optional start end
Function insert-buffer-substring-no-properties from-buffer-or-name &optional start end

31.5 User-Level Insertion Commands

type statement
Command insert-buffer from-buffer-or-name
Command self-insert-command count
Command newline &optional number-of-newlines
Variable overwrite-mode

31.6 Deleting Text

type statement
Command erase-buffer
Command delete-region start end
Function delete-and-extract-region start end
Command delete-char count &optional killp
Command delete-backward-char count &optional killp
Command backward-delete-char-untabify count &optional killp
User Option backward-delete-char-untabify-method

31.7 User-Level Deletion Commands

type statement
Command delete-horizontal-space &optional backward-only
Command delete-indentation &optional join-following-p
Command fixup-whitespace
Command just-one-space &optional n
Command delete-blank-lines
Command delete-trailing-whitespace &optional start end

31.8 The Kill Ring

31.8.1 Kill Ring Concepts

31.8.2 Functions for Killing

type statement
Command kill-region start end &optional region
User Option kill-read-only-ok
Command copy-region-as-kill start end &optional region

31.8.3 Yanking

type statement
Function insert-for-yank string
Function insert-buffer-substring-as-yank buf &optional start end
User Option yank-handled-properties
User Option yank-excluded-properties

31.8.4 Functions for Yanking

type statement
Command yank &optional arg
Command yank-pop &optional arg
Variable yank-undo-function

31.8.5 Low-Level Kill Ring

type statement
Function current-kill n &optional do-not-move
Function kill-new string &optional replace
Function kill-append string before-p
Variable interprogram-paste-function
Variable interprogram-cut-function

31.8.6 Internals of the Kill Ring

type statement
Variable kill-ring
Variable kill-ring-yank-pointer
User Option kill-ring-max

31.9 Undo

type statement
Variable buffer-undo-list
Function undo-boundary
Function undo-auto-amalgamate
Variable undo-auto-current-boundary-timer
Variable undo-in-progress
Function primitive-undo count list

31.10 Maintaining Undo Lists

type statement
Command buffer-enable-undo &optional buffer-or-name
Command buffer-disable-undo &optional buffer-or-name
User Option undo-limit
User Option undo-strong-limit
User Option undo-outer-limit
User Option undo-ask-before-discard

31.11 Filling

type statement
Command fill-paragraph &optional justify region
Command fill-region start end &optional justify nosqueeze to-eo
Command fill-individual-paragraphs start end &optional justify citation-regexp
User Option fill-individual-varying-indent
Command fill-region-as-paragraph start end &optional justify nosqueeze squeeze-after
Command justify-current-line &optional how eop nosqueeze
User Option default-justification
Function current-justification
User Option sentence-end-double-space
User Option sentence-end-without-period
User Option sentence-end-without-space
Variable fill-paragraph-function
Variable fill-forward-paragraph-function
Variable use-hard-newlines

31.12 Margins for Filling

type statement
User Option fill-column
Command set-left-margin from to margin
Command set-right-margin from to margin
Function current-left-margin
Function current-fill-column
Command move-to-left-margin &optional n force
Function delete-to-left-margin &optional from to
Function indent-to-left-margin
User Option left-margin
User Option fill-nobreak-predicate

31.13 Adaptive Fill Mode

type statement
User Option adaptive-fill-mode
Function fill-context-prefix from to
User Option adaptive-fill-regexp
User Option adaptive-fill-first-line-regexp
User Option adaptive-fill-function

31.14 Auto Filling

type statement
Variable auto-fill-function
Variable normal-auto-fill-function
Variable auto-fill-chars

31.15 Sorting Text

type statement
Function sort-subr reverse nextrecfun endrecfun &optional startkeyfun endkeyfun predicate
User Option sort-fold-case
Command sort-regexp-fields reverse record-regexp key-regexp start end
Command sort-lines reverse start end
Command sort-paragraphs reverse start end
Command sort-pages reverse start end
Command sort-fields field start end
Command sort-numeric-fields field start end
User Option sort-numeric-base
Command sort-columns reverse &optional beg end

31.16 Counting Columns

type statement
Function current-column
Command move-to-column column &optional force

31.17 Indentation

31.17.1 Indentation Primitives

type statement
Function current-indentation
Command indent-to column &optional minimum
User Option indent-tabs-mode

31.17.2 Indentation Controlled by Major Mode

type statement
Command indent-for-tab-command &optional rigid
Variable indent-line-function
Command indent-according-to-mode
Command newline-and-indent
Command reindent-then-newline-and-indent
User Option tab-always-indent

31.17.3 Indenting an Entire Region

type statement
Command indent-region start end &optional to-column
Variable indent-region-function
Command indent-rigidly start end count
Command indent-code-rigidly start end columns &optional nochange-regexp

31.17.4 Indentation Relative to Previous Lines

type statement
Command indent-relative &optional unindented-ok
Command indent-relative-maybe

31.17.5 Adjustable Tab Stops

type statement
Command tab-to-tab-stop
User Option tab-stop-list

31.17.6 Indentation-Based Motion Commands

type statement
Command back-to-indentation
Command backward-to-indentation &optional arg
Command forward-to-indentation &optional arg

31.18 Case Changes

type statement
Command capitalize-region start end
Command downcase-region start end
Command upcase-region start end
Command capitalize-word count
Command downcase-word count
Command upcase-word count

31.19 Text Properties

31.19.1 Examining Text Properties

type statement
Function get-text-property pos prop &optional object
Function get-char-property position prop &optional object
Function get-pos-property position prop &optional object
Function get-char-property-and-overlay position prop &optional object
Variable char-property-alias-alist
Function text-properties-at position &optional object
Variable default-text-properties

31.19.2 Changing Text Properties

type statement
Function put-text-property start end prop value &optional object
Function add-text-properties start end props &optional object
Function remove-text-properties start end props &optional object
Function remove-list-of-text-properties start end list-of-properties &optional object
Function set-text-properties start end props &optional object
Function add-face-text-property start end face &optional appendp object
Function propertize string &rest properties

31.19.3 Text Property Search Functions

type statement
Function next-property-change pos &optional object limit
Function previous-property-change pos &optional object limit
Function next-single-property-change pos prop &optional object limit
Function previous-single-property-change pos prop &optional object limit
Function next-char-property-change pos &optional limit
Function previous-char-property-change pos &optional limit
Function next-single-char-property-change pos prop &optional object limit
Function previous-single-char-property-change pos prop &optional object limit
Function text-property-any start end prop value &optional object
Function text-property-not-all start end prop value &optional object

31.19.4 Properties with Special Meanings

type statement
Variable inhibit-point-motion-hooks
Variable show-help-function

31.19.5 Formatted Text Properties

31.19.6 Stickiness of Text Properties

type statement
Variable text-property-default-nonsticky
Function insert-and-inherit &rest strings
Function insert-before-markers-and-inherit &rest strings

31.19.7 Lazy Computation of Text Properties

type statement
Variable buffer-access-fontify-functions
Variable buffer-access-fontified-property

31.19.8 Defining Clickable Text

type statement
Function mouse-on-link-p pos

31.19.9 Defining and Using Fields

type statement
Function field-beginning &optional pos escape-from-edge limit
Function field-end &optional pos escape-from-edge limit
Function field-string &optional pos
Function field-string-no-properties &optional pos
Function delete-field &optional pos
Function constrain-to-field new-pos old-pos &optional escape-from-edge only-in-line inhibit-capture-property

31.19.10 Why Text Properties are not Intervals

31.20 Substituting for a Character Code

type statement
Function subst-char-in-region start end old-char new-char &optional noundo
Command translate-region start end table

31.21 Registers

type statement
Variable register-alist
Function get-register reg
Function set-register reg value
Command view-register reg
Command insert-register reg &optional beforep
Function register-read-with-preview prompt

31.22 Transposition of Text

type statement
Function transpose-regions start1 end1 start2 end2 &optional leave-markers

31.23 Dealing With Compressed Data

type statement
Function zlib-available-p
Function zlib-decompress-region start end

31.24 Base 64 Encoding

type statement
Command base64-encode-region beg end &optional no-line-break
Function base64-encode-string string &optional no-line-break
Command base64-decode-region beg end
Function base64-decode-string string

31.25 Checksum/Hash

type statement
Function secure-hash algorithm object &optional start end binary
Function md5 object &optional start end coding-system noerror

31.26 Parsing HTML and XML

type statement
Function libxml-parse-html-region start end &optional base-url discard-comments
Function shr-insert-document dom
Function libxml-parse-xml-region start end &optional base-url discard-comments

31.27 Atomic Change Groups

type statement
Function prepare-change-group &optional buffer
Function activate-change-group handle
Function accept-change-group handle
Function cancel-change-group handle

31.28 Change Hooks

type statement
Variable before-change-functions
Variable after-change-functions
Macro combine-after-change-calls body...
Variable first-change-hook
Variable inhibit-modification-hooks

おわり

ざっと眺めてみたけど答はなかったみたい。 ナローイングと併せて insert するんかな。

しかし、、、、沢山あるな。