aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2017-05-22 15:48:21 -0400
committerSam Steingold2017-05-22 15:48:21 -0400
commit62046ed3e9b1e95340eb980058b8f7aadae2447a (patch)
treebded1d5973aa0b6405de8dfdc4677da95cdb377e
parentbf96464e2f731c9b7a9f9589b2de001a03ed3f2f (diff)
downloademacs-62046ed3e9b1e95340eb980058b8f7aadae2447a.tar.gz
emacs-62046ed3e9b1e95340eb980058b8f7aadae2447a.zip
Fix "g" in hg&git push&pull buffers
lisp/vc/vc-git.el (vc-git--pushpull): Set locally `compilation-directory' and `compilation-arguments'. lisp/vc/vc-hg.el (vc-hg--pushpull): Likewise.
-rw-r--r--lisp/vc/vc-git.el10
-rw-r--r--lisp/vc/vc-hg.el10
2 files changed, 18 insertions, 2 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index f70bbddbe7b..a4ce76ec37e 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -888,7 +888,15 @@ If PROMPT is non-nil, prompt for the Git command to run."
888 (vc-compilation-mode 'git) 888 (vc-compilation-mode 'git)
889 (setq-local compile-command 889 (setq-local compile-command
890 (concat git-program " " command " " 890 (concat git-program " " command " "
891 (if args (mapconcat 'identity args " ") ""))))) 891 (if args (mapconcat 'identity args " ") "")))
892 (setq-local compilation-directory root)
893 ;; Either set `compilation-buffer-name-function' locally to nil
894 ;; or use `compilation-arguments' to set `name-function'.
895 ;; See `compilation-buffer-name'.
896 (setq-local compilation-arguments
897 (list compile-command nil
898 (lambda (_name-of-mode) buffer)
899 nil))))
892 (vc-set-async-update buffer))) 900 (vc-set-async-update buffer)))
893 901
894(defun vc-git-pull (prompt) 902(defun vc-git-pull (prompt)
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 37ea928a9c2..fff25ed64bf 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -1344,7 +1344,15 @@ commands, which only operated on marked files."
1344 (vc-compilation-mode 'hg) 1344 (vc-compilation-mode 'hg)
1345 (setq-local compile-command 1345 (setq-local compile-command
1346 (concat hg-program " " command " " 1346 (concat hg-program " " command " "
1347 (if args (mapconcat 'identity args " ") ""))))) 1347 (if args (mapconcat 'identity args " ") "")))
1348 (setq-local compilation-directory root)
1349 ;; Either set `compilation-buffer-name-function' locally to nil
1350 ;; or use `compilation-arguments' to set `name-function'.
1351 ;; See `compilation-buffer-name'.
1352 (setq-local compilation-arguments
1353 (list compile-command nil
1354 (lambda (_name-of-mode) buffer)
1355 nil))))
1348 (vc-set-async-update buffer))))) 1356 (vc-set-async-update buffer)))))
1349 1357
1350(defun vc-hg-pull (prompt) 1358(defun vc-hg-pull (prompt)