mark-whole-buffer ¶の概要GNU Emacs 22 では、関数全体のコードは次のようになっています。
(defun mark-whole-buffer () "Put point at beginning and mark at end of buffer. You probably should not use this function in Lisp programs; it is usually a mistake for a Lisp function to use any subroutine that uses or sets the mark." (interactive) (push-mark (point)) (push-mark (point-max) nil t) (goto-char (point-min)))
他のすべての関数と同様に、mark-whole-buffer
関数も関数定義のテンプレートに当てはまります。テンプレートは以下のようになります。
(defun name-of-function (argument-list) "documentation..." (interactive-expression...) body...)
この関数の仕組みは以下の通りです。関数名はmark-whole-bufferで、その後に空の引数リスト‘()’が続いており、これはこの関数が引数を必要としないことを意味します。次にドキュメントが続きます。
次の行は (interactive) 式で、この関数が対話的に使用されることを Emacs
に伝えます。これらの詳細は、前節で説明した simplified-beginning-of-buffer 関数と同様です。