变量:
abbrev-table-name-list 缩写表变量的列表
global-abbrev-table 全局缩写表变量
local-abbrev-table 当前buffer的缩写表
fundamental-mode-abbrev-table 基础模式的本地缩写表
abbrev-all-caps 非空表示扩展多字缩写时全部大写
abbrev-start-location 指出expand-abbrev的缩写起始point
abbrev-start-location-buffer 指出abbrev-start-location的buffer
last-abbrev 最后一次扩展的缩写
last-abbrev-text 最后一个扩展的文本
last-abbrev-location 最后一次扩展的位置
函数:
make-abbrev-table 生成一个缩写表(向量表示)
clear-abbrev-table 清空一个缩写表(向量内容为0)
define-abbrev 定义一个缩写到缩写表中,命名为NAME,扩展式为EXPANSION, hook参数为可选的,扩展时调用hook函数(不带参数). 取消一个缩写的定义, 只要把EXPANSION设为nil即可.
define-global-abbrev 定义一个全局的缩写,等价于
(define-abbrev global-abbrev-table name expansion)
define-mode-abbrev 定义一个特殊模式的缩写. 等价于
(define-abbrev current_buffer->abbrev_table name expansion)
abbrev-symbol 查看缩写是否定义, 若果没定义table,模式从特殊模式缩写表中查找,然后是全局缩写表
abbrev-expansion 返回缩写的扩展式字符串到当前buffer,如果指定table,则只从table中查找
expand-abbrev 扩展当前point前的缩写, 如果它是缩写,则扩展生效而不管缩写模式是否使能. 如果使用扩展式替换,则返回t.(绑定到C-x ', C-x a e, C-x a ')
unexpand-abbrev 取消前一次的缩写扩展(只能用一次)
insert-abbrev-table-description 在当前point后输出缩写表的定义
define-abbrev-table 定一个缩写表并插入到abbrev-table-name-list, definitions是缩写表中的定义(列表形式).