File: meta-mode.el.html

Description:

This Emacs Lisp package provides a major mode for editing Metafont or MetaPost sources. It includes all the necessary code to set up a major mode including an appropriate syntax table, keymap, and a mode-specific pull-down menu. It also provides a sophisticated set of font-lock patterns, a fancy indentation function adapted from AUCTeX's latex.el, and some basic mode-specific editing functions such as functions to move to the beginning or end of the enclosing environment, or to mark, re-indent, or comment-out environments. On the other hand, it doesn't yet provide any functionality for running Metafont or MetaPost in a shell buffer from within Emacs, but such functionality might be added later, either as part of this package or as a separate Emacs Lisp package.

Customization:

Following the usual Emacs Lisp coding conventions, the major modes defined in this package provide several hook variables to allow for local customization when entering the modes. In particular, there is a meta-common-mode-hook which applies to both modes as well as metafont-mode-hook and metapost-mode-hook which apply to the individual modes. In addition, there are several variables and regexps controlling e.g. the behavior of the indentation function, which may be customized. Please refer to the docstrings in the code below for details.

Availability:

As of this version 1.0, this package will be uploaded to CTAN archives, where it shall find a permanent home, presumably in tex-archive/support/emacs-modes. It will also be submitted for integration into the GNU Emacs distribution at that time.

History:

v 0.0 -- 1997/02/01 UV Started writing meta-mode.el.
v 0.1 -- 1997/02/02 UV Added preliminary set of font-lock patterns.
v 0.2 -- 1997/02/03 UV Improved and debugged font-lock patterns.
                         Added indent-line-function for TAB.
v 0.3 -- 1997/02/17 UV Improved font-lock patterns and syntax table.
                         Improved and debugged indentation function.
v 0.4 -- 1997/02/18 UV Added functions to indent regions for M-C-q,
                         also added a preliminary mode-specific menu.
v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous
                         defun and to re-indent or comment-out defuns.
v 0.6 -- 1997/02/20 UV More debugging, testing and clean-up.
v 0.7 -- 1997/02/22 UV Use easymenu to define mode-specific menu.
v 0.8 -- 1997/02/24 UV Added completion function for M-TAB.
v 0.9 -- 1997/03/08 UV Added fill-paragraph function for comments.
                         Also fixed a few remaining font-lock problems.
                         Added meta-mode-load-hook to load meta-buf.el.
v 1.0 -- 1997/04/07 UV Cleanup for official public release.

Historical Footnote:

This package was begun on February 1, 1997, exactly 20 years after the genesis of TeX took place according to Don Knuth's own account
(cf. `The Errors of TeX', reprinted in `Literate Programming',
Chapter 10, p. 249). What better date could there be to choose?

Defined variables (38)

meta-begin-defun-regexpRegexp matching beginning of defuns in Metafont or MetaPost mode.
meta-begin-environment-regexpRegexp matching the beginning of environments to be indented.
meta-common-mode-hookHook evaluated by both ‘metafont-mode’ and ‘metapost-mode’.
meta-common-mode-mapKeymap used in Metafont or MetaPost mode.
meta-common-mode-syntax-tableSyntax table used in Metafont or MetaPost mode.
meta-common-plain-macros-listList of macros common to plain Metafont and MetaPost.
meta-common-primitives-listList of primitives common to Metafont and MetaPost.
meta-complete-listList of ways to perform completion in Metafont or MetaPost mode.
meta-end-defun-regexpRegexp matching the end of defuns in Metafont or MetaPost mode.
meta-end-environment-regexpRegexp matching the end of environments to be indented.
meta-font-lock-keywordsDefault expressions to highlight in Metafont or MetaPost mode.
meta-ignore-comment-regexpRegexp matching comments whose indentation should not be touched.
meta-indent-levelIndentation of begin-end blocks in Metafont or MetaPost mode.
meta-left-comment-regexpRegexp matching comments that should be placed on the left margin.
meta-mode-abbrev-tableAbbrev table used in Metafont or MetaPost mode.
meta-mode-load-hookHook evaluated when first loading Metafont or MetaPost mode.
meta-mode-mapKeymap used in Metafont or MetaPost mode.
meta-mode-menuMenu used in Metafont or MetaPost mode.
meta-right-comment-regexpRegexp matching comments that should be placed on the right margin.
meta-symbol-changedFlag indicating whether ‘meta-symbol-list’ has been initialized.
meta-symbol-listList of known symbols to complete in Metafont or MetaPost mode.
meta-within-environment-regexpRegexp matching keywords within environments not to be indented.
metafont-mode-abbrev-tableAbbrev table for ‘metafont-mode’.
metafont-mode-hookHook evaluated by ‘metafont-mode’ after ‘meta-common-mode-hook’.
metafont-mode-mapKeymap for ‘metafont-mode’.
metafont-mode-syntax-tableSyntax table for ‘metafont-mode’.
metafont-plain-macros-listList of macros only defined in plain Metafont.
metafont-primitives-listList of primitives only defined in Metafont.
metafont-symbol-listList of known symbols to complete in Metafont mode.
metapost-boxes-macros-listList of macros only defined in MetaPost "boxes" package.
metapost-graph-macros-listList of macros only defined in MetaPost "graph" package.
metapost-mode-abbrev-tableAbbrev table for ‘metapost-mode’.
metapost-mode-hookHook evaluated by ‘metapost-mode’ after ‘meta-common-mode-hook’.
metapost-mode-mapKeymap for ‘metapost-mode’.
metapost-mode-syntax-tableSyntax table for ‘metapost-mode’.
metapost-plain-macros-listList of macros only defined in plain MetaPost.
metapost-primitives-listList of primitives only defined in MetaPost.
metapost-symbol-listList of known symbols to complete in MetaPost mode.

Defined functions (30)

font-lock-match-meta-declaration-item-and-skip-to-next(LIMIT)
meta-add-symbols(&rest ENTRIES)
meta-beginning-of-defun(&optional ARG)
meta-car-string-lessp(A B)
meta-comment-defun(&optional ARG)
meta-comment-indent()
meta-comment-region(BEG END &optional ARG)
meta-common-mode()
meta-complete-symbol()
meta-end-of-defun(&optional ARG)
meta-indent-buffer()
meta-indent-calculate()
meta-indent-current-indentation()
meta-indent-current-nesting()
meta-indent-defun()
meta-indent-in-string-p()
meta-indent-level-count()
meta-indent-line()
meta-indent-looking-at-code(REGEXP)
meta-indent-previous-line()
meta-indent-region(BEG END)
meta-indent-unfinished-line()
meta-listify(A)
meta-mark-defun()
meta-mode-menu(ARG1)
meta-symbol-list()
meta-uncomment-defun()
meta-uncomment-region(BEG END)
metafont-mode()
metapost-mode()

Defined faces (0)