GNU Emacs 32.0.50 (9008bf64c3) のマニュアルを PLaMo 翻訳で機械翻訳したものです。誤訳を含むことがあります。原文: https://www.gnu.org/software/emacs/manual/html_node/eintr/See-variable-current-value.html ・ emacs-doc.conao3.com

変数の現在の値を確認する

describe-variable 関数を使えば、任意の変数の現在の値を確認できます。この関数は通常、C-h v と入力することで呼び出されます。プロンプトが表示された際に C-h v、次に kill-ring(続いて RET)と入力すると、現在のキルリングの内容が表示されます――かなりの量になるかもしれません!逆に、今回の Emacs セッションでこのドキュメントを読んでいただけであれば、キルリングには何も入っていないかもしれません。また、kill-ring のドキュメントも表示されます:

Documentation:
List of killed text sequences.
Since the kill ring is supposed to interact nicely with cut-and-paste
facilities offered by window systems, use of this variable should
interact nicely with `interprogram-cut-function' and
`interprogram-paste-function'.  The functions `kill-new',
`kill-append', and `current-kill' are supposed to implement this
interaction; you may want to use them instead of manipulating the kill
ring directly.

キルリングは、以下のようにdefvarによって定義されます:

(defvar kill-ring nil
  "List of killed text sequences.
...")

この変数定義では、変数に nil という初期値が割り当てられています。何も保存していない場合に yank コマンドを入力しても何も返ってこないため、これは理にかなっています。ドキュメント文字列は、defun のドキュメント文字列と同様に記述されます。defun のドキュメント文字列と同様に、ドキュメントの1行目は完全な文である必要があります。というのも、apropos のようにドキュメントの1行目のみを出力するコマンドがあるためです。それ以降の行はインデントしないでください。そうしないと、C-h v (describe-variable) を使用した際に不自然な見た目になります。