Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hook triggered before each run of P4 command #210

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions p4.el
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ P4PORT and P4USER and set from the current Perforce settings."
:type 'hook
:group 'p4)

(defcustom p4-before-command-call-hook nil
"Hook run before p4 command is called."
:type 'hook
:group 'p4)

(defcustom p4-set-client-hooks nil
"Hook run after client is changed."
:type 'hook
Expand Down Expand Up @@ -1112,6 +1117,7 @@ opposed to showing it in the echo area)."
p4-process-pop-up-output pop-up-output
p4-process-synchronous
(or synchronous (memq (intern cmd) p4-synchronous-commands)))
(run-hooks 'p4-before-command-call-hook)
(p4-process-restart)))

;; This empty function can be passed as an :after-show callback
Expand Down