aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc
diff options
context:
space:
mode:
authorMichael Albinus2016-11-20 16:29:47 +0100
committerMichael Albinus2016-11-20 16:29:47 +0100
commit22946702b4296c0e42e4baf6221e205b52d05cbf (patch)
treea81e506e5176351677c8f677e32cde6236d1b070 /lisp/vc
parent26c45889259682af0fbf05bccf7f084408860125 (diff)
downloademacs-22946702b4296c0e42e4baf6221e205b52d05cbf.tar.gz
emacs-22946702b4296c0e42e4baf6221e205b52d05cbf.zip
Add file-local-name
* doc/lispref/files.texi (Magic File Names): Add `file-local-name'. (Unique File Names): Use it. * etc/NEWS: Mention `file-local-name'. * lisp/files.el (file-local-name): New defun. (file-expand-wildcards): * lisp/eshell/em-tramp.el (eshell/su, eshell/sudo): * lisp/eshell/esh-ext.el (eshell-remote-command): * lisp/eshell/esh-proc.el (eshell-gather-process-output): * lisp/org/ob-core.el (org-babel-local-file-name): * lisp/progmodes/gud.el (gud-common-init, gud-format-command): * lisp/progmodes/python.el (python-shell-send-file): * lisp/shell.el (shell): * lisp/vc/ediff-diff.el (ediff-same-file-contents): * lisp/vc/vc-git.el (vc-git-checkin): Use it.
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/ediff-diff.el6
-rw-r--r--lisp/vc/vc-git.el9
2 files changed, 5 insertions, 10 deletions
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index b1ac32d7019..56bfebb579c 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -1347,10 +1347,8 @@ arguments to `skip-chars-forward'."
1347 ;; located on the same remote host. 1347 ;; located on the same remote host.
1348 (apply 'process-file ediff-cmp-program nil nil nil 1348 (apply 'process-file ediff-cmp-program nil nil nil
1349 (append ediff-cmp-options 1349 (append ediff-cmp-options
1350 (list (or (file-remote-p f1 'localname) 1350 (list (expand-file-name (file-local-name f1))
1351 (expand-file-name f1)) 1351 (expand-file-name (file-local-name f2)))))
1352 (or (file-remote-p f2 'localname)
1353 (expand-file-name f2)))))
1354 )) 1352 ))
1355 (and (numberp res) (eq res 0))) 1353 (and (numberp res) (eq res 0)))
1356 1354
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 9df581dda5b..ec0e081743d 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -704,13 +704,10 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
704 ;; file, to work around the limitation that command-line 704 ;; file, to work around the limitation that command-line
705 ;; arguments must be in the system codepage, and therefore 705 ;; arguments must be in the system codepage, and therefore
706 ;; might not support the non-ASCII characters in the log 706 ;; might not support the non-ASCII characters in the log
707 ;; message. 707 ;; message. Handle also remote files.
708 (if (eq system-type 'windows-nt) 708 (if (eq system-type 'windows-nt)
709 (if (file-remote-p file1) 709 (let ((default-directory (file-name-directory file1)))
710 (let ((default-directory (file-name-directory file1))) 710 (file-local-name (make-nearby-temp-file "git-msg"))))))
711 (file-remote-p
712 (make-nearby-temp-file "git-msg") 'localname))
713 (make-temp-file "git-msg")))))
714 (cl-flet ((boolean-arg-fn 711 (cl-flet ((boolean-arg-fn
715 (argument) 712 (argument)
716 (lambda (value) (when (equal value "yes") (list argument))))) 713 (lambda (value) (when (equal value "yes") (list argument)))))