emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 62046ed: Fix "g" in hg&git push&pull buffers


From: Sam Steingold
Subject: [Emacs-diffs] master 62046ed: Fix "g" in hg&git push&pull buffers
Date: Mon, 22 May 2017 15:48:27 -0400 (EDT)

branch: master
commit 62046ed3e9b1e95340eb980058b8f7aadae2447a
Author: Sam Steingold <address@hidden>
Commit: Sam Steingold <address@hidden>

    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.
---
 lisp/vc/vc-git.el | 10 +++++++++-
 lisp/vc/vc-hg.el  | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index f70bbdd..a4ce76e 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."
         (vc-compilation-mode 'git)
         (setq-local compile-command
                     (concat git-program " " command " "
-                            (if args (mapconcat 'identity args " ") "")))))
+                            (if args (mapconcat 'identity args " ") "")))
+        (setq-local compilation-directory root)
+        ;; Either set `compilation-buffer-name-function' locally to nil
+        ;; or use `compilation-arguments' to set `name-function'.
+        ;; See `compilation-buffer-name'.
+        (setq-local compilation-arguments
+                    (list compile-command nil
+                          (lambda (_name-of-mode) buffer)
+                          nil))))
     (vc-set-async-update buffer)))
 
 (defun vc-git-pull (prompt)
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 37ea928..fff25ed 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -1344,7 +1344,15 @@ commands, which only operated on marked files."
             (vc-compilation-mode 'hg)
             (setq-local compile-command
                         (concat hg-program " " command " "
-                                (if args (mapconcat 'identity args " ") "")))))
+                                (if args (mapconcat 'identity args " ") "")))
+            (setq-local compilation-directory root)
+            ;; Either set `compilation-buffer-name-function' locally to nil
+            ;; or use `compilation-arguments' to set `name-function'.
+            ;; See `compilation-buffer-name'.
+            (setq-local compilation-arguments
+                        (list compile-command nil
+                              (lambda (_name-of-mode) buffer)
+                              nil))))
        (vc-set-async-update buffer)))))
 
 (defun vc-hg-pull (prompt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]