説明文字列からキー列を参照するときには、
現在の活性なキーバインディングを使うべきです。
これは以下に述べる特別なテキスト列でできます。
普通の方法で説明文字列を参照すると、
これらの特別な列は現在のキーバインディング情報で置き換えられます。
置き換えはsubstitute-command-keysを呼び出して行います。
読者自身がこの関数を使うこともできます。
特別な列とその意味を以下にあげます。
\[command]\{mapvar}describe-bindingsを使って作成する。
\<mapvar>\=注意: Emacs Lispでは、文字列内の`\'は、2つ続けて書くこと。
この関数は、stringから上記の特別な列を探し、 それらをそれらが意味するものに置き換え、結果を文字列で返す。 これにより、説明文の表示では、 ユーザー独自のカスタマイズしたキーバインディングを実際に参照できる。
特別な列の例を示します。
(substitute-command-keys
"To abort recursive edit, type: \\[abort-recursive-edit]")
=> "To abort recursive edit, type: C-]"
(substitute-command-keys
"The keys that are defined for the minibuffer here are:
\\{minibuffer-local-must-match-map}")
=> "The keys that are defined for the minibuffer here are:
? minibuffer-completion-help
SPC minibuffer-complete-word
TAB minibuffer-complete
C-j minibuffer-complete-and-exit
RET minibuffer-complete-and-exit
C-g abort-recursive-edit
"
(substitute-command-keys
"To abort a recursive edit from the minibuffer, type\
\\<minibuffer-local-must-match-map>\\[abort-recursive-edit].")
=> "To abort a recursive edit from the minibuffer, type C-g."