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

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 関数と同様です。