diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2016-11-20 16:29:47 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2016-11-20 16:29:47 +0100 |
commit | 22946702b4296c0e42e4baf6221e205b52d05cbf (patch) | |
tree | a81e506e5176351677c8f677e32cde6236d1b070 /lisp/org/ob-core.el | |
parent | 26c45889259682af0fbf05bccf7f084408860125 (diff) | |
download | emacs-22946702b4296c0e42e4baf6221e205b52d05cbf.tar.gz |
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/org/ob-core.el')
-rw-r--r-- | lisp/org/ob-core.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index e3d778f73b4..c76d276369f 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -2680,9 +2680,12 @@ Fixes a bug in `tramp-handle-call-process-region'." (apply org-babel-call-process-region-original start end program delete buffer display args))) -(defun org-babel-local-file-name (file) - "Return the local name component of FILE." - (or (file-remote-p file 'localname) file)) +(defalias 'org-babel-local-file-name + (if (fboundp 'file-local-name) + 'file-local-name + (lambda (file) + "Return the local name component of FILE." + (or (file-remote-p file 'localname) file)))) (defun org-babel-process-file-name (name &optional no-quote-p) "Prepare NAME to be used in an external process. |