これらは、Emacsバッファ内のボタンを特定し、操作するためのコマンドおよび関数です。
push-button
は、ユーザーが実際にボタンを押し込む際に使用するコマンドであり、デフォルトではボタン自体のオーバーレイまたはテキストプロパティにあるローカルキーマップを用いて、RET および mouse-2 にバインドされています。forward-button や backward-button のようにボタン外部で有用なコマンドは、button-buffer-map
に格納されているキーマップでも利用可能です。ボタンを使用するモードでは、自身のキーマップの親キーマップとして button-buffer-map を利用することが考えられます。あるいは、button-mode を有効にすることでほぼ同様の効果を得られます。これは button-buffer-map
をマイナーモードキーマップとしてインストールするだけのマイナーモードです(なお、button-mode を無効にすると、現在のバッファ内のすべてのボタンが削除されます)。
ボタンに nil follow-link
以外のプロパティが設定されており、かつ mouse-1-click-follows-link
が設定されている場合、mouse-1 を素早くクリックしても push-button コマンドが実行されます。クリック可能なテキストの定義 を参照してください。
位置 pos で、ボタンで指定されたアクションを実行します。pos はバッファ位置またはマウスイベントのいずれかです。use-mouse-action が nil
以外であるか、または pos がマウスイベント(マウスイベント を参照)である場合は、action の代わりにボタンの mouse-action
プロパティを呼び出すようにします。ボタンに mouse-action
プロパティがない場合は、通常通り action を使用します。pos のデフォルト値は point ですが、push-button
がマウスイベントの結果としてインタラクティブに呼び出された場合は、そのマウスイベントの位置が使用されます。pos にボタンがない場合は何も行わず nil
を返し、それ以外の場合は t を返します。
Move to the nth next button, or nth previous button if n is
negative. If n is zero, move to the start of any
button at point. If wrap is non-nil, moving past either end of the buffer continues from
the other end. If display-message is non-nil, the button’s help-echo string is displayed.
Any button with a non-nil skip property is skipped over. Returns the button
found, and signals an error if no buttons can be found. If no-error is non-nil, return
nil instead of signaling the error.
Move to the nth previous button, or nth next button if n is negative.
If n is zero, move to the start of any button at
point. If wrap is non-nil,
moving past either end of the buffer continues from the other end. If display-message is non-nil, the
button’s help-echo string is displayed. Any button with a non-nil skip property is skipped
over. Returns the button found, and signals an error if no buttons can be
found. If no-error is non-nil, return nil instead of
signaling the error.