Like, Control-A (select all) followed by delete?
These macros build on the answers given above. To start using them paste them into your .emacs then restart emacs or (while in the .emacs buffer) type M-x eval-buffer.
(defun clear-buffer ()
"clear whole buffer add contents to the kill ring"
(interactive)
(kill-region (point-min) (point-max))
)
(defun clear-buffer-permenantly ()
"clear whole buffer, contents is not added to the kill ring"
(interactive)
(delete-region (point-min) (point-max))
)