I know there are all kinds of clever perforce modes, but I prefer to have a few common perforce actions that I write myself and can easily extend and customise as needed.

For example this is all you need to checkout a file you are visiting.


(defun p4-checkout-buffer()
"Check out the current buffer from perforce using a shell command line"
(interactive)
(shell-command (format "p4.exe edit %s" (buffer-file-name)))
(toggle-read-only -1))