21.10 Minibuffer 命令

本节描述一些用于迷你缓冲区中的命令。

Command: exit-minibuffer

该命令退出当前激活的迷你缓冲区。它通常绑定在 迷你缓冲区本地按键映射中。如果当前缓冲区是迷你缓冲区 但并非激活的迷你缓冲区,该命令会抛出错误。

Command: self-insert-and-exit

该命令插入键盘上最后输入的字符(保存在 last-command-event 中; see 来自命令循环的信息),然后退出激活的迷你缓冲区。

Command: previous-history-element n

该命令将迷你缓冲区内容替换为第 n 个更早的历史条目。

Command: next-history-element n

该命令将迷你缓冲区内容替换为第 n 个更新的历史条目。 历史位置可以超出当前位置,并触发“未来历史” (see 使用迷你缓冲区读取文本字符串)。

Command: previous-matching-history-element pattern n

该命令将迷你缓冲区内容替换为第 n 个更早、且匹配 pattern (正则表达式)的历史条目。

Command: next-matching-history-element pattern n

该命令将迷你缓冲区内容替换为第 n 个更新、且匹配 pattern (正则表达式)的历史条目。

Command: previous-complete-history-element n

该命令将迷你缓冲区内容替换为第 n 个更早、 且能补全光标前迷你缓冲区当前内容的历史条目。

Command: next-complete-history-element n

该命令将迷你缓冲区内容替换为第 n 个更新、 且能补全光标前迷你缓冲区当前内容的历史条目。

Command: goto-history-element nabs

该函数将迷你缓冲区历史中的条目放入迷你缓冲区。 参数 nabs 以降序指定绝对历史位置,其中 0 表示当前条目, 正数 n 表示第 n 个更早的条目。 若 NABS 为负数 -n,则表示“未来历史”中的第 n 项。 当该函数到达由 read-from-minibuffer(see 使用迷你缓冲区读取文本字符串) 和 completing-read(see 补全与小缓冲) 提供的默认值末尾时,会将补全候选项加入“未来历史”, 参见 minibuffer-default-add-function


emacs

Emacs

org-mode

Orgmode

Donations

打赏

Copyright

© Jasper Hsu

Creative Commons

Creative Commons

Attribute

Attribute

Noncommercial

Noncommercial

Share Alike

Share Alike